home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Standards 1994 January / InfoMagic Standards - January 1994.iso / inet / doc / admin.txt < prev    next >
Text File  |  1990-04-03  |  180KB  |  3,472 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                              Introduction
  11.                                   to
  12.                             Administration
  13.                                 of an
  14.                             Internet-based
  15.                             Local Network
  16.  
  17.  
  18.  
  19.                       C                       R
  20.  
  21.                               C       S
  22.                   Computer Science Facilities Group
  23.                               C       I
  24.  
  25.                       L                       S
  26.  
  27.  
  28.                                RUTGERS
  29.                   The State University of New Jersey
  30.             Center for Computers and Information Services
  31.                Laboratory for Computer Science Research
  32.  
  33.  
  34.                             3 October 1988
  35.  
  36. This  is an introduction for people who intend to set up or administer
  37. a network based on the Internet networking protocols (TCP/IP).
  38.  
  39. Copyright (C) 1988, Charles L. Hedrick.   Anyone  may  reproduce  this
  40. document,  in  whole  or  in  part,  provided  that:   (1) any copy or
  41. republication of the entire document must show Rutgers  University  as
  42. the  source,  and  must  include this notice; and (2) any other use of
  43. this material must reference this manual and Rutgers  University,  and
  44. the fact that the material is copyright by Charles Hedrick and is used
  45. by permission.
  46.  
  47.  
  48.  
  49. Unix is a trademark of AT&T Technologies, Inc.
  50.  
  51.  
  52.  
  53.                           Table of Contents
  54.  
  55.  
  56.    1. The problem                                                    1
  57.        1.1 Some comments about terminology                           2
  58.    2. Routing and Addressing                                         2
  59.    3. Choosing an addressing structure                               5
  60.        3.1 Should you subdivide your address space?                  6
  61.        3.2 Subnets vs. multiple network numbers                      6
  62.        3.3 How to allocate subnet or network numbers                 8
  63.        3.4 Dealing with multiple "virtual" subnets on one network    9
  64.            3.4.1 Dealing with Multiple  Subnets  by  Turning  off   10
  65.                  Subnetting
  66.            3.4.2 Multiple Subnets: Implications for Broadcasting    11
  67.        3.5 Choosing an address class                                11
  68.        3.6 Dialup  IP  and  Micro  gateways: Dynamically assigned   12
  69.            addresses
  70.            3.6.1 Dialup IP                                          12
  71.            3.6.2 Micro gateways                                     14
  72.    4. Network-wide Services, Naming                                 15
  73.    5. Setting up routing for an individual computer                 19
  74.        5.1 How datagrams are routed                                 21
  75.        5.2 Fixed routes                                             23
  76.        5.3 Routing redirects                                        24
  77.        5.4 Other ways for hosts to find routes                      26
  78.            5.4.1 Spying on Routing                                  26
  79.            5.4.2 Proxy ARP                                          27
  80.            5.4.3 Moving to New Routes After Failures                32
  81.    6. Bridges and Gateways                                          35
  82.        6.1 Alternative Designs                                      36
  83.            6.1.1 A mesh of point to point lines                     36
  84.            6.1.2 Circuit switching technology                       37
  85.            6.1.3 Single-level networks                              37
  86.            6.1.4 Mixed designs                                      38
  87.        6.2 An introduction to alternative switching technologies    39
  88.            6.2.1 Repeaters                                          40
  89.            6.2.2 Bridges and gateways                               41
  90.            6.2.3 More about bridges                                 43
  91.            6.2.4 More about gateways                                44
  92.        6.3 Comparing the switching technologies                     45
  93.            6.3.1 Isolation                                          45
  94.            6.3.2 Performance                                        46
  95.            6.3.3 Routing                                            47
  96.            6.3.4 Network management                                 49
  97.            6.3.5 A final evaluation                                 52
  98.    7. Configuring Gateways                                          52
  99.        7.1 Configuring routing for gateways                         55
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.                                   i
  109.  
  110.  
  111.  
  112. This document is intended to help people who are planning to set up  a
  113. new  network  based  on  the  Internet  protocols, or to administer an
  114. existing one.    It  assumes  a  basic  familiarity  with  the  TCP/IP
  115. protocols,  particularly  the  structure  of  Internet  addresses.   A
  116. companion paper, "Introduction to the Internet Protocols", may provide
  117. a  convenient introduction.  This document does not attempt to replace
  118. technical  documentation  for  your  specific  TCP/IP  implementation.
  119. Rather, it attempts to give overall background that is not specific to
  120. any  particular  implementation.    It  is  directed  specifically  at
  121. networks  of "medium" complexity.  That is, it is probably appropriate
  122. for a network involving several dozen buildings.   Those  planning  to
  123. manage  larger networks will need more preparation than you can get by
  124. reading this document.
  125.  
  126. In a number of cases, commands  and  output  from  Berkeley  Unix  are
  127. shown.    Most  computer  systems  have  commands  that are similar in
  128. function to these.  It seemed more useful to give some actual examples
  129. that  to  limit  myself to general talk, even if the actual output you
  130. see is slightly different.
  131.  
  132.  
  133.  
  134. 1. The problem
  135.  
  136.  
  137. This document will emphasize primarily "logical" network architecture.
  138. There  are many documents and articles in the trade press that discuss
  139. actual network media, such as Ethernet, Token  Ring,  etc.    What  is
  140. generally  not  made  clear  in  these  articles is that the choice of
  141. network media is generally not  all  that  critical  for  the  overall
  142. design  of  a  network.   What can be done by the network is generally
  143. determined more by the network protocols supported, and the quality of
  144. the  implementations.  In practice, media are normally chosen based on
  145. purely pragmatic grounds: what media are supported by  the  particular
  146. types  of  computer that you have to connect, the distance you have to
  147. go, and the logistics of installing various kinds of cable.  Generally
  148. this means that Ethernet is used for medium-scale systems, Ethernet or
  149. a network  based  on  twisted-pair  wiring  for  micro  networks,  and
  150. specialized high-speed networks (typically token ring) for campus-wide
  151. backbones, and for local networks involving super-computer  and  other
  152. very high-performance applications.
  153.  
  154. Thus  this  document  assumes  that  you  have  chosen  and  installed
  155. individual networks such as Ethernet or token ring,  and  your  vendor
  156. has  helped  you connect your computers to these network.  You are now
  157. faced with the interrelated problems of
  158.  
  159.    - configuring the software on your computers
  160.  
  161.    - finding a way to connect individual Ethernets, token rings, etc.,
  162.      to form a single coherent network
  163.  
  164.    - connecting your networks to the outside world
  165.  
  166. My  primary  thesis in this document is that these decisions require a
  167.                                   1
  168.  
  169.  
  170.  
  171. bit  of  advance  thought.    In   fact,   most   networks   need   an
  172. "architecture".   This consists of a way of assigning addresses, a way
  173. of doing routing, and various choices about how  hosts  interact  with
  174. the  network.  These decisions need to be made for the entire network,
  175. preferably when it is first being installed.
  176.  
  177.  
  178.  
  179. 1.1 Some comments about terminology
  180.  
  181.  
  182. I am going to use the term "IP" throughout this document to  refer  to
  183. networks  designed  to carry TCP/IP.  IP is the network-level protocol
  184. from the Internet (TCP/IP) family of protocols.   Thus  it  is  common
  185. practice  to  use  the term "IP" when referring to addresses, routing,
  186. and other network-layer items.  In fact the distinction is not  always
  187. very  clear.    So  in practice the terms Internet, TCP/IP, and IP may
  188. appear to be almost interchangeable.
  189.  
  190. The terms "packet" and "datagram"  are  also  almost  interchangeable.
  191. Ideally,  "packet" is used for the lowest-level physical unit, whereas
  192. "datagram" refers to a unit of data at the level of IP.  However these
  193. are identical for most media, so people have nearly stopped making the
  194. distinction.  I have tried to use the  terms  correctly,  even  though
  195. these days it may sound a bit pedantic.  The term "packet" seems to be
  196. winning out in  common  speech.    For  example,  gateway  speeds  are
  197. generally  given  in  "packets  per  second."    I  have used the more
  198. technically accurate  "datagrams  per  second,"  since  it  is  really
  199. datagrams that are being counted.
  200.  
  201. I  use  the  term  "gateway"  where  some  other authors use "router."
  202. "Gateway" is the original  Internet  term.    Unfortunately,  the  ISO
  203. community  has  begun  using  the  same  word  with a rather different
  204. meaning.  People have started using "router" because it  doesn't  have
  205. this  ambiguity.    I am continuing to use "gateway" because, like the
  206. companion Introduction to the Internet  Protocols,  this  document  is
  207. intended to help you make sense of the Internet specifications.  Those
  208. specifications use "gateway."
  209.  
  210.  
  211.  
  212. 2. Routing and Addressing
  213.  
  214.  
  215. Many of the decisions that you need  to  make  in  setting  up  an  IP
  216. network  depend  upon  routing,  so  it  will be best to give a bit of
  217. background on that topic now.  I will return to  routing  in  a  later
  218. section  when  discussing  gateways  and  bridges.    In  general,  IP
  219. datagrams pass through many networks as they  are  going  between  the
  220. source and destination.  Here's a typical example.  (Addresses used in
  221. the examples are taken from Rutgers University.)
  222.  
  223.  
  224.  
  225.  
  226.                                   2
  227.  
  228.  
  229.  
  230.               network 1               network 2     network 3
  231.                128.6.4                 128.6.21      128.121
  232.         ============================  ==========  ================
  233.           |              |        |    |      |    |         |
  234.        ___|______   _____|____  __|____|__  __|____|____  ___|________
  235.        128.6.4.2    128.6.4.3   128.6.4.1   128.6.21.1    128.121.50.2
  236.                                 128.6.21.2  128.121.50.1
  237.        __________   __________  __________  ____________  ____________
  238.        computer A   computer B   gateway R    gateway S    computer C
  239.  
  240.  
  241. This diagram shows three normal computer systems,  two  gateways,  and
  242. three  networks.  The networks might be Ethernets, token rings, or any
  243. other sort.  Network 2 could even be a  single  point  to  point  line
  244. connecting gateways R and S.
  245.  
  246. Note  that computer A can send datagrams to computer B directly, using
  247. network 1.  However it can't reach computer  C  directly,  since  they
  248. aren't  on  the  same  network.    There  are  several ways to connect
  249. separate networks.  This diagram assumes that gateways are used. (In a
  250. later  section,  we'll look at alternatives.)  In this case, datagrams
  251. going between A and C must be sent through gateway R, network  2,  and
  252. gateway   S.   Every  computer  that  uses  TCP/IP  needs  appropriate
  253. information and algorithms to allow it to know when datagrams must  be
  254. sent through a gateway, and to choose an appropriate gateway.
  255.  
  256. Routing  is  very  closely tied to the choice of addresses.  Note that
  257. the address of each computer begins with the  number  of  the  network
  258. that  it's  attached  to.    Thus  128.6.4.2 and 128.6.4.3 are both on
  259. network 128.6.4.  Next, notice that gateways, whose job is to  connect
  260. networks,  have  an  address  on each of those networks.  For example,
  261. gateway R connects networks 128.6.4 and 128.6.21.  Its  connection  to
  262. network  128.6.4 has the address 128.6.4.1.  Its connection to network
  263. 128.6.21 has the address 128.6.21.2.
  264.  
  265. Because of this association between addresses  and  networks,  routing
  266. decisions  can  be  based  strictly  on  the  network  number  of  the
  267. destination.  Here's what the routing information for computer A might
  268. look like:
  269.  
  270.        network    gateway     metric
  271.  
  272.        128.6.4    none        0
  273.        128.6.21   128.6.4.1   1
  274.        128.121    128.6.4.1   2
  275.  
  276. From  this  table, computer A can tell that datagrams for computers on
  277. network 128.6.4 can be sent directly, and datagrams for  computers  on
  278. networks  128.6.21  and  128.121  need  to  be  sent  to gateway R for
  279. forwarding.  The "metric" is used by  some  routing  algorithms  as  a
  280. measure  of how far away the destination is.  In this case, the metric
  281. simply indicates how many gateways the datagram  has  to  go  through.
  282. (This is often referred to as a "hop count".)
  283.  
  284. When  computer  A  is  ready  to  send  a  datagram,  it  examines the
  285.                                   3
  286.  
  287.  
  288.  
  289. destination address.  It gets the network number from the beginning of
  290. the  address,  and  then  looks in the routing table.  The table entry
  291. indicates  whether  the  datagram  should  be  sent  directly  to  the
  292. destination or to a gateway.
  293.  
  294. Note  that  a  gateway  is  simply a computer that is connected to two
  295. different networks, and is prepared to forward datagrams between them.
  296. In  many  cases  it is most efficient to use special-purpose equipment
  297. that are designed as gateways.  However it is  perfectly  possible  to
  298. use  ordinary  computers,  as  long as they have more than one network
  299. interface, and their software is prepared to forward datagrams.   Most
  300. major TCP/IP implementations (even for microcomputers) are designed to
  301. let you use your computer as a gateway.  However some of this software
  302. has limitations that can cause trouble for your network.
  303.  
  304. Note that a gateway has several addresses -- one for each network that
  305. it's attached to.  This is a difference  between  IP  and  some  other
  306. network  protocols: each interface from a computer to a network has an
  307. address.  With some  other  protocols,  each  computer  has  only  one
  308. address,  which  applies  to all of its interfaces.  A gateway between
  309. networks 128.6.4 and 128.6.21 will have an address  that  begins  with
  310. 128.6.4  (for  example,  128.6.4.1).    This  address  refers  to  its
  311. connection to network 128.6.4.  It will  also  have  an  address  that
  312. begins  with  128.6.21  (for example, 128.6.21.2).  This refers to its
  313. connection to network 128.6.21.
  314.  
  315. The term "network" probably makes you think of things  like  Ethernet,
  316. which  can  have  many  machines attached.  However it also applies to
  317. point to point lines.  In the diagram above, networks 1 and 3 could be
  318. in different cities.  Then network 2 could be a serial line, satellite
  319. link, or other long-distance point to point connection between the two
  320. locations.    A  point to point line is treated as a network that just
  321. happens to have only two computers on it.  As with any other  network,
  322. the  point to point line has a network number (in this case 128.6.21).
  323. The systems connected by the line (gateways R and S) have addresses on
  324. that network (in this case 128.6.21.1 and 128.6.21.2).
  325.  
  326. It  is  possible  to  design  routing software that does not require a
  327. separate network number for each point to point line.  In  that  case,
  328. the  interface between the gateway and the point to point line doesn't
  329. have an address.  This can be useful if your network is so large  that
  330. you  are  in  danger  of running out of network numbers.  However such
  331. "anonymous interfaces"  can  make  network  management  somewhat  more
  332. difficult.    If  there is no address, network management software may
  333. have no way to refer to the interface.  Thus you may not  be  able  to
  334. get data on throughput and errors for that interface.
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.                                   4
  345.  
  346.  
  347.  
  348. 3. Choosing an addressing structure
  349.  
  350.  
  351. The  first  comment  to  make about addresses is a warning: Before you
  352. start using an IP network, you must get one or more  official  network
  353. numbers.    IP  addresses  look like this: 128.6.4.3.  This address is
  354. used by one computer at Rutgers University.  The  first  part  of  it,
  355. 128.6,  is  a  network  number,  allocated  to  Rutgers  by  a central
  356. authority.  Before you start allocating addresses to  your  computers,
  357. you  must  get an official network number.  Unfortunately, some people
  358. set up networks using either a randomly-chosen number,  or  a  generic
  359. number  supplied by the vendor.  While this may work in the short run,
  360. it is a very bad idea for the long run.  Eventually, you will want  to
  361. connect  your  network  to some other organization's network.  Even if
  362. your organization is highly secret and very concerned about  security,
  363. somewhere  in  your  organization  there  is  going  to  be a research
  364. computer that ends up being connected to a nearby  university.    That
  365. university  will  probably  be  connected  to  a  large-scale national
  366. network.  As soon as one of your datagrams escapes your local network,
  367. the  organization you are talking to is going to become very confused,
  368. because the addresses that  appear  in  your  datagrams  are  probably
  369. officially allocated to someone else.
  370.  
  371. The  solution  to this is simple: get your own network number from the
  372. beginning.  It costs nothing.  If you delay it,  then  sometime  years
  373. from  now  you  are  going  to be faced with the job of changing every
  374. address on a large network.  Network numbers are currently assigned by
  375. the  DDN Network Information Center, SRI International, 333 Ravenswood
  376. Avenue, Menlo Park, California 94025 (telephone: 800-235-3155).    You
  377. can  get  a  network  number no matter what your network is being used
  378. for.  You do not need authorization to connect  to  the  Defense  Data
  379. Network  in order to get a number.  The main piece of information that
  380. will be needed when you apply for a  network  number  is  the  address
  381. class that you want.  See below for a discussion of this.
  382.  
  383. In  many ways, the most important decision you have to make in setting
  384. up a network is how you will assign IP addresses  to  your  computers.
  385. This  choice  should be made with a view of how your network is likely
  386. to grow.  Otherwise, you will find that you have to change  addresses.
  387. When you have several hundred computers, address changes can be nearly
  388. impossible.
  389.  
  390. Addresses are critical because IP datagrams are routed on the basis of
  391. their  address.    For example, addresses at Rutgers University have a
  392. 2-level structure.  A typical address is 128.6.4.3.  128.6 is assigned
  393. to  Rutgers  University.    As  far as the outside world is concerned,
  394. 128.6 is a single network.  Other universities send any datagram whose
  395. address  begins  with  128.6  to the nearest Rutgers gateway.  However
  396. within Rutgers, we divide up our address space into "subnets".  We use
  397. the next 8 bits of address to indicate which subnet a computer belongs
  398. to.    128.6.4.3  belongs  to  subnet  128.6.4.    Generally   subnets
  399. correspond  to physical networks, e.g. separate Ethernets, although we
  400. will see some exceptions later.  Systems inside Rutgers, unlike  those
  401. outside,  contain  information about the Rutgers subnet structure.  So
  402. once a datagram for 128.6.4.3 arrives at Rutgers, the Rutgers  network
  403.                                   5
  404.  
  405.  
  406.  
  407. will  route  it to the departmental Ethernet, token ring, or whatever,
  408. that has been assigned subnet number 128.6.4.
  409.  
  410. When you start a network, there are several addressing decisions  that
  411. face you:
  412.  
  413.    - Do you subdivide your address space?
  414.  
  415.    - If so, do you use subnets or class C addresses?
  416.  
  417.    - How big an address space do you need?
  418.  
  419.  
  420.  
  421. 3.1 Should you subdivide your address space?
  422.  
  423.  
  424. It  is  not  necessary  to  use  subnets  at  all.   There are network
  425. technologies that allow an entire campus or company to act as a single
  426. large  logical Ethernet, so that no internal routing is necessary.  If
  427. you use this technology, then  you  do  not  need  to  subdivide  your
  428. address  space.    In that case, the only decision you have to make is
  429. what class of address to apply for.  However we recommend using either
  430. a  subnet  approach  or  some other method of subdividing your address
  431. space in most networks:
  432.  
  433.    - In section 6.2 we will argue that internal gateways are desirable
  434.      for all networks beyond the very simplest.
  435.  
  436.    - Even if you do not need gateways now, you may find later that you
  437.      need to  use  them.  Thus  it  probably  makes  sense  to  assign
  438.      addresses  as  if  each Ethernet or token ring were going to be a
  439.      separate subnet.  This will allow for conversion to real  subnets
  440.      later if it proves necessary.
  441.  
  442.    - For  network  maintenance  purposes,  it  is  convenient  to have
  443.      addresses whose structure corresponds to  the  structure  of  the
  444.      network.   For example, when you see a stray datagram from system
  445.      128.6.4.3, it is nice to know that all addresses  beginning  with
  446.      128.6.4 are in a particular building.
  447.  
  448.  
  449.  
  450. 3.2 Subnets vs. multiple network numbers
  451.  
  452.  
  453. Suppose  that  you have been convinced that it's a good idea to impose
  454. some structure on your addresses.  The  next  question  is  what  that
  455. structure should be.  There are two basic approaches.  One is subnets.
  456. The other is multiple network numbers.
  457.  
  458. The Internet  standards  specify  the  format  of  an  address.    For
  459. addresses  beginning  with  128  through  191 (the most common numbers
  460. these days), the first two octets form the network number.    E.g.  in
  461. 140.3.50.1, 140.3 is the network number.  Network numbers are assigned
  462.                                   6
  463.  
  464.  
  465.  
  466. to a particular organization.  What you do with the next two octets is
  467. up  to  you.    You  could  choose  to make the next octet be a subnet
  468. number, or you could use some other scheme entirely.  Gateways  within
  469. your  organization  must  be set up to know the subnetting scheme that
  470. you are using.  However outside your organization, no  one  will  know
  471. that 140.3.50 is one subnet and 140.3.51 is another.  They will simply
  472. know that 140.3 is your organization.  Unfortunately, this ability  to
  473. add additional structure to the address via subnets was not present in
  474. the original IP specifications.  Thus some older software is incapable
  475. of being told about subnets.
  476.  
  477. If  enough of the software that you are using has this problem, it may
  478. be impractical for you to use subnets.  Some organizations have used a
  479. different  approach.   It is possible for an organization to apply for
  480. several network numbers.  Instead of dividing a single network number,
  481. say  140.3,  into  several subnets, e.g. 140.3.1 through 140.3.10, you
  482. could apply for 10 different network  numbers.    Thus  you  might  be
  483. assigned  the  range  140.3 through 140.12.  All IP software will know
  484. that these are different network numbers.
  485.  
  486. While using separate network numbers will work just fine  within  your
  487. organization,  it  has two very serious disadvantages.  The first, and
  488. less serious, is that it wastes address space.  There are  only  about
  489. 16,000  possible  class  B addresses.  We cannot afford to waste 10 of
  490. them on your organization, unless it is very large.  This objection is
  491. less  serious because you would normally ask for class C addresses for
  492. this  purpose,  and  there  are  about  2  million  possible  class  C
  493. addresses.
  494.  
  495. The  more  serious  problem  with using several network numbers rather
  496. than subnets is that it overloads the routing tables in  the  rest  of
  497. the Internet.  As mentioned above, when you divide your network number
  498. into subnets, this division is known within your organization, but not
  499. outside  it.    Thus  systems  outside your organization need only one
  500. entry in their tables in order to be able to reach you.    E.g.  other
  501. universities  have entries in their routing tables for 128.6, which is
  502. the Rutgers network number.  If you use a  range  of  network  numbers
  503. instead  of  subnets,  that  division  will  be  visible to the entire
  504. Internet.  If we used 128.6  through  128.16  instead  of  subdividing
  505. 128.6, other universities would need entries for each of those network
  506. numbers in their routing tables.   As  of  this  writing  the  routing
  507. tables  in many of the national networks are exceeding the size of the
  508. current  routing  technology.    It  would  be  considered   extremely
  509. unfriendly  for  any organization to use more than one network number.
  510. This may not be a problem if your network is going  to  be  completely
  511. self-contained,  or if only one small piece of it will be connected to
  512. the  outside  world.    Nevertheless,  most  TCP/IP  experts  strongly
  513. recommend  that  you  use  subnets rather than multiple networks.  The
  514. only reason for considering multiple networks is to deal with software
  515. that  cannot  handle subnets.  This was a problem a few years ago, but
  516. is currently less serious.   As  long  as  your  gateways  can  handle
  517. subnets,  you  can deal with a few individual computers that cannot by
  518. using "proxy ARP" (see below).
  519.  
  520. One warning about subnets: Your subnets must all be "adjacent".   That
  521.                                   7
  522.  
  523.  
  524.  
  525. is,  you  can't have a configuration where you get from subnet 128.6.4
  526. to subnet 128.6.5 by going through some other network  entirely,  e.g.
  527. 128.121.    For  example,  Rutgers  has  campuses in New Brunswick and
  528. Newark.  It is perfectly OK for the networks  in  both  cities  to  be
  529. subnets  of  128.6.    However  in  that  case,  the  lines beween New
  530. Brunswick and Newark must also be part of 128.6.  Suppose  we  decided
  531. to  use  a  regional  network  such as JvNCnet to talk between our two
  532. campuses, instead of providing  our  own  lines.    Since  JvNCnet  is
  533. 128.121,  the  gateways  and serial lines that they provide would have
  534. addresses that begin with 128.121.  This violate the rules.  It is not
  535. allowable  to  have  gateways  or  lines  that  are  part  of  128.121
  536. connecting two parts of 128.6.  So if we wanted to use JvNCnet between
  537. our  two  campuses, we'd have to get different network numbers for the
  538. two campuses.  (This rule  is  a  result  of  limitations  in  routing
  539. technology.    Eventually  gateway software will probably be developed
  540. that can deal with configurations whose networks are not contiguous.)
  541.  
  542.  
  543.  
  544. 3.3 How to allocate subnet or network numbers
  545.  
  546.  
  547. Now that you have decided to use subnets or multiple network  numbers,
  548. you  have  to  decide  how  to allocate them.  Normally this is fairly
  549. easy.  Each physical network, e.g. Ethernet or token ring, is assigned
  550. a  separate  subnet  or  network  number.    However  you do have some
  551. options.
  552.  
  553. In some cases it may make sense to assign several subnet numbers to  a
  554. single  physical  network.   At Rutgers we have a single Ethernet that
  555. spans three buildings, using repeaters.  It is very clear to  us  that
  556. as  computers  are  added  to this Ethernet, it is going to have to be
  557. split into several separate Ethernets.  In order to  avoid  having  to
  558. change  addresses when this is done, we have allocated three different
  559. subnet numbers to this Ethernet, one per building.    (This  would  be
  560. handy  even  if  we didn't plan to split the Ethernet, just to help us
  561. keep track of where computers are.)  However before doing  this,  make
  562. very  sure  that  the  software  on all of your computers can handle a
  563. network that has three different network numbers on it.  This issue is
  564. discussed in more detail in section 3.4.
  565.  
  566. You also have to choose a "subnet mask".  This is used by the software
  567. on your systems to separate the subnet from the rest of  the  address.
  568. So  far  we  have  always  assumed  that  the first two octets are the
  569. network number, and the next octet is the subnet number.  For class  B
  570. addresses,  the  standards  specify  that the first two octets are the
  571. network number.  However we are free to choose  the  boundary  between
  572. the  subnet  number  and the rest of the address.  It's very common to
  573. have a one-octet subnet number,  but  that's  not  the  only  possible
  574. choice.  Let's look again at a class B address, e.g. 128.6.4.3.  It is
  575. easy to see that if the third octet is used for a subnet number, there
  576. are 256 possible subnets and within each subnet there are 256 possible
  577. addresses.  (Actually, the numbers are more  like  254,  since  it  is
  578. generally a bad idea to use 0 or 255 for subnet numbers or addresses.)
  579. Suppose you know that you will never have more than 128 computers on a
  580.                                   8
  581.  
  582.  
  583.  
  584. given subnet, but you are afraid you might need more than 256 subnets.
  585. (For example, you might have a campus with lots of  small  buildings.)
  586. In that case, you could define 9 bits for the subnet number, leaving 7
  587. bits for addresses within each subnet.  This choice is expressed by  a
  588. bit  mask,  using  ones  for  the  bits used by the network and subnet
  589. number, and 0's for the bits  used  for  individual  addresses.    Our
  590. normal  subnet  mask  choice is given as 255.255.255.0.  If we chose 9
  591. bit subnet numbers and 7 bit  addresses,  the  subnet  mask  would  be
  592. 255.255.255.128.
  593.  
  594. Generally  it is possible to specify the subnet mask for each computer
  595. as part of configuring its IP software.  The IP protocols  also  allow
  596. for computers to send a query asking what the subnet mask is.  If your
  597. network supports broadcast queries, and there is at least one computer
  598. or  gateway  on  the  network  that  knows  the subnet mask, it may be
  599. unnecessary to set it on the other computers.  However this capability
  600. brings  with  it a whole new set of possible problems.  One well-known
  601. TCP/IP implementation would answer with the  wrong  subnet  mask  when
  602. queried,  thus  leading causing every other computer on the network to
  603. be misconfigured.  Thus it may  be  safest  to  set  the  subnet  mask
  604. explicitly on each system.
  605.  
  606.  
  607.  
  608. 3.4 Dealing with multiple "virtual" subnets on one network
  609.  
  610.  
  611. Most  software  is written under the assumption that every computer on
  612. the local network has the same subnet number.  When traffic  is  being
  613. sent  to  a  machine with a different subnet number, the software will
  614. generally expect to find  a  gateway  to  handle  forwarding  to  that
  615. subnet.  Let's look at the implications.  Suppose subnets 128.6.19 and
  616. 128.6.20 are on the same Ethernet.  Consider the way things look  from
  617. the point of view of a computer with address 128.6.19.3.  It will have
  618. no problem sending to other machines with addresses 128.6.19.x.   They
  619. are on the same subnet, and so our computer will know to send directly
  620. to them on the local Ethernet.  However suppose it is asked to send  a
  621. datagram  to  128.6.20.2.    Since  this  is  a different subnet, most
  622. software will expect to find a gateway that handles forwarding between
  623. the  two  subnets.    Of  course there isn't a gateway between subnets
  624. 128.6.19 and 128.6.20, since they are on the same Ethernet.  Thus  you
  625. have  to find a way to tell your software that 128.6.20 is actually on
  626. the same Ethernet.
  627.  
  628. Most common TCP/IP implementations can deal with more than one  subnet
  629. on  a  network.    For  example,  Berkeley  Unix lets you use a slight
  630. modification of the command used to define gateways.  Suppose that you
  631. get  from  subnet  128.6.19  to  subnet  128.6.4 using a gateway whose
  632. address is 128.6.19.1.  You would use the command
  633.  
  634.   route add 128.6.4.0 128.6.19.1 1
  635.  
  636. This says that to reach subnet 128.6.4, traffic should be sent via the
  637. gateway  at  128.6.19.1, and that the route only has to go through one
  638. gateway.  The "1" is referred to as the "routing metric".  If you  use
  639.                                   9
  640.  
  641.  
  642.  
  643. a  metric  of  0, you are saying that the destination subnet is on the
  644. same network, and no gateway is needed.  In  our  example,  on  system
  645. 128.6.19.3, you would use
  646.  
  647.   route add 128.6.20.0 128.6.19.1 0
  648.  
  649. The  actual  address  used  in place of 128.6.19.1 is irrelevant.  The
  650. metric of 0 says that no gateway is actually going to be used, so  the
  651. gateway  address  is  not used.  However it must be a legal address on
  652. the local network.
  653.  
  654. Note that the commands in this section are simply examples. You should
  655. look  in  the  documentation for your particular implementation to see
  656. how to configure your routing.
  657.  
  658.  
  659.  
  660. 3.4.1 Dealing with Multiple Subnets by Turning off Subnetting
  661.  
  662.  
  663. There is another  way  to  handle  several  subnets  on  one  physical
  664. network.    This  method  involves  intentionally  misconfiguring your
  665. hosts, so it is potentially dangerous if you don't watch what you  are
  666. doing.    However  it may be easier to deal with when you have lots of
  667. subnets on one physical network.  An example of this is  a  site  that
  668. uses  bridges, and uses subnets simply for administrative convenience.
  669. The trick is to configure the software on your hosts as  if  you  were
  670. not  using  subnets at all.  In this case your hosts will not make any
  671. distinction between the subnets, and they'll have no  trouble  dealing
  672. with all of them.  Now the only problem is how to talk to subnets that
  673. are not on this multi-subnet network.  However if your gateways handle
  674. proxy  ARP,  they  will  solve that problem for you.  This approach is
  675. likely to be  convenient  when  the  same  network  is  carrying  many
  676. subnets, particularly if additional ones are likely to be added later.
  677. However it has two problems:
  678.  
  679. If you have any hosts with multiple interfaces, you will  have  to  be
  680. very careful.  First, only one interface should be on the multi-subnet
  681. network.  For example, suppose you have a "network" that is made up of
  682. several Ethernets connected by bridges.  You can't have a machine with
  683. interfaces on two of those Ethernets.  However you can have  a  system
  684. with  one  interface  on  the multi-subnet network and another on some
  685. totally separate subnet.  Second, any machine with multiple interfaces
  686. will  have  to  know  the  real  subnet mask, and will need to be told
  687. explicitly which subnets are  on  the  multi-subnet  network.    These
  688. restrictions  come about because a system with multiple interfaces has
  689. to know which interface to use in any given case.
  690.  
  691. You will have to be careful about the ICMP subnet mask facility.  This
  692. is a facility that allows systems to broadcast a query asking what the
  693. subnet mask is.  If most of  your  hosts  think  the  network  is  not
  694. subnetted,  but  your  gateways and multi-interface hosts think it is,
  695. you've got a potential for confusion.  If a gateway or multi-interface
  696. host  happens to send an ICMP subnet mask reply giving the real subnet
  697. mask, some of your other hosts  may  pick  it  up.    The  reverse  is
  698.                                   10
  699.  
  700.  
  701.  
  702. possible as well.  This means that you will either have to
  703.  
  704.    - disable  ICMP subnet mask replies on all of the systems that know
  705.      the real subnet mask.  (This may be easy if  only  gateways  know
  706.      it.)
  707.  
  708.    - make sure that your hosts ignore ICMP replies
  709.  
  710. According  to the most recent documents, as long as you set the subnet
  711. mask explicitly, hosts are supposed to ignore  the  ICMP  subnet  mask
  712. mechanism.   So you should be able to set different masks on different
  713. hosts without causing any  problem,  as  long  as  you  set  the  mask
  714. explicitly  for  all  of  them.   However we have noticed that some IP
  715. implementations will change their subnet mask when they  see  an  ICMP
  716. subnet mask reply.
  717.  
  718.  
  719.  
  720. 3.4.2 Multiple Subnets: Implications for Broadcasting
  721.  
  722.  
  723. When  you  have more than one subnet on the same physical network, you
  724. need to give some thought to broadcast addresses.   According  to  the
  725. latest  standards,  there  are two different ways for a host on subnet
  726. 128.6.20 to send a broadcast on the local network.    One  is  to  use
  727. address  128.6.20.255.    The other is to use address 255.255.255.255.
  728. 128.6.20.255  says  explicitly  "all  hosts   on   subnet   128.6.20".
  729. 255.255.255.255  says "all hosts on my local network".  Normally these
  730. have the same effect.  However they do  not  when  there  are  several
  731. subnets  on  one  physical network.  If subnet 128.6.19 is on the same
  732. Ethernet,  it  is   also   going   to   receive   messages   sent   to
  733. 255.255.255.255.    However  hosts  with  numbers  128.6.19.x will not
  734. listen to broadcasts to 128.6.20.255.  The  result  is  that  the  two
  735. different  forms  of  broadcast  address  will have somewhat different
  736. meanings.  This means that you will have  to  exercise  some  care  in
  737. configuring  software  on  networks  such  as  this, to make sure that
  738. broadcasts go where you intend them to go.
  739.  
  740.  
  741.  
  742. 3.5 Choosing an address class
  743.  
  744.  
  745. When you apply for an official network number, you will be asked  what
  746. class  of network number you need.  The possible answers are A, B, and
  747. C. This affects how large an address  space  you  will  be  allocated.
  748. Class  A addresses are one octet long, class B addresses are 2 octets,
  749. and class C addresses are 3  octets.    This  represents  a  tradeoff:
  750. there are a lot more class C addresses than class A addresses, but the
  751. class C addresses don't allow as many hosts.  The idea was that  there
  752. would  be  a few very large networks, a moderate number of medium-size
  753. ones, and a lot of mom-and-pop stores with small networks.  Here is  a
  754. table showing the distinction:
  755.  
  756.  
  757.                                   11
  758.  
  759.  
  760.  
  761.        class  range of first octet   network  rest  possible addresses
  762.          A       1 - 126               p      q.r.s    16777214
  763.          B       128 - 191             p.q      r.s    65534
  764.          C       192 - 223             p.q.r      s    254
  765.  
  766. For  example  network  10,  a  class  A network, has addresses between
  767. 10.0.0.1 and 10.255.255.254.  So it allows 254**3, or about 16 million
  768. possible  addresses.    (Actually,  network 10 has allocated addresses
  769. where some of the octets are zero, so there are a few  more  addresses
  770. possible.)    Network  192.12.88,  a class C network has hosts between
  771. 192.12.88.1 and 192.12.88.254, i.e. 254 possible hosts.
  772.  
  773. In general, you will be expected to choose the lowest class that  will
  774. provide  you with enough addresses to handle your growth over the next
  775. few years.  Organizations that have computers in many  buildings  will
  776. probably need and be able to get a class B address, assuming that they
  777. are going to use subnetting.  (If you are going to use  many  separate
  778. network  numbers,  you  would  ask for a number of class C addresses.)
  779. Class A addresses are normally used only for large public networks and
  780. for a few very large corporate networks.
  781.  
  782.  
  783.  
  784. 3.6 Dialup IP and Micro gateways: Dynamically assigned addresses
  785.  
  786.  
  787. In  most  cases, each of your computers will have its own permanent IP
  788. address.  However there are a few situations where it makes more sense
  789. to  allocate  addresses  dynamically.    The most common cases involve
  790. dialup IP, and gateways intended primarily for microcomputers.
  791.  
  792.  
  793.  
  794. 3.6.1 Dialup IP
  795.  
  796.  
  797. It is possible to run IP over dialup lines.  The protocol for doing so
  798. is  called  SLIP  ("serial  line IP").  SLIP is useful in at least two
  799. different circumstances:
  800.  
  801.    - As a low-cost alternative to permanent point to point lines,  for
  802.      cases  where  there  isn't  enough  traffic  to justify dedicated
  803.      lines.
  804.  
  805.    - As a way to connect individual PC's into a network when they  are
  806.      located  in  buildings  that  don't  have  Ethernets or other LAN
  807.      technology.
  808.  
  809. I am going to use the term "SLIP server" to refer to a computer system
  810. that  has  modems  attached,  which other systems can connect to using
  811. SLIP.  Such a system will provide a gateway into your network  for  PC
  812. users or for other networks that connect using SLIP.
  813.  
  814. If  you  have  a number of individual PC's dialing up with SLIP, it is
  815. often not practical to assign each PC its own IP  address.    For  one
  816.                                   12
  817.  
  818.  
  819.  
  820. thing,  there  may just not be enough addresses.  In order to keep the
  821. routing straight, the dialup systems have to get addresses on the same
  822. subnet  as  the  SLIP  server.    Generally  there  are only 256 or so
  823. addresses available on each subnet.  If you have more PC's than  that,
  824. you  can't give each one its own address.  If you have SLIP servers on
  825. more than one subnet, this will make  permanent  addresses  even  more
  826. difficult.    If a user wanted to be able to call both servers, his PC
  827. would need two addresses, one for each subnet.
  828.  
  829. In order to avoid these problems,  many  SLIP  implementations  assign
  830. addresses  dynamically.   When a PC first connects to the SLIP server,
  831. the server finds an unused IP address and assigns it to the PC.    The
  832. simplest  way to manage this is to give each SLIP server a range of IP
  833. addresses that it keeps track of and can assign.
  834.  
  835. When you use such a scheme, your SLIP software has to include some way
  836. for  the  server to tell the PC what address to use.  If each PC has a
  837. permanent address, you have the reverse problem:  when a  PC  connects
  838. to  a server, there has to be a way for the PC to tell the server what
  839. its address is.  Some care is needed.  Otherwise  someone  could  have
  840. his PC claim to be yours and steal all your files.
  841.  
  842. Unfortunately,  there  is  no  standard way to manage these addressing
  843. issues with SLIP.  There are several SLIP implementations that  handle
  844. them, but there isn't a single standard yet.  Until such a standard is
  845. developed, you need to check out SLIP software carefully.   Make  sure
  846. that  it assigns addresses the way you want, and that your SLIP server
  847. and your PC's agree on how to figure out the PC's address.
  848.  
  849. I recommend giving the PC's permanent addresses in cases  where  other
  850. computers  have to be able to tell which PC they are talking to.  This
  851. would be the case if the PC is going to receive private computer mail,
  852. or  engage in other sensitive transactions.  I recommend using dynamic
  853. addresses where you have a lot of PC's,  and  where  the  applications
  854. that they access over the network do their own security checking.
  855.  
  856. When  you  are  using  SLIP  to  connect  two networks, you have three
  857. choices for handling addressing (although not all  SLIP  software  can
  858. handle all three choices):
  859.  
  860.    - Treat  SLIP connections like point to point lines that just don't
  861.      happen to be up all  the  time.    If  you  call  more  than  one
  862.      computer,  each  pair  of  computers  that  talks  has a separate
  863.      network number which they use only when they talk to each other.
  864.  
  865.    - Use routing software that allows anonymous interfaces.   In  that
  866.      case no address is needed at all.
  867.  
  868.    - Assign  addresses dynamically when the connection is opened, just
  869.      as you would for a PC that is dialing up.
  870.  
  871. If you make connections only to one or two other systems, it is  quite
  872. reasonable  to  use a network number for each connection.  This method
  873. makes it easy to keep usage and error statistics.
  874.  
  875.                                   13
  876.  
  877.  
  878.  
  879. If you have many different connections, it is  probably  best  to  use
  880. anonymous   interfaces.    You  would  probably  use  dynamic  address
  881. allocation only if your routing technology did not  support  anonymous
  882. interfaces.
  883.  
  884.  
  885.  
  886. 3.6.2 Micro gateways
  887.  
  888.  
  889. It  is  perfectly  possible for microcomputers to participate in an IP
  890. network.  However there seems to be  a  tendency  for  micros  to  use
  891. somewhat  different  network  technology than larger systems.  This is
  892. because many micro users start with specialized network software whose
  893. design  is  tailored specifically to the needs of micros, or even some
  894. particular type of micro.  Micro users quite naturally want to be able
  895. to  start  using  TCP/IP  without  having to abandon any special micro
  896. network that they are already using.   For  that  reason  there  is  a
  897. growing number of gateway products that allow PC's to access both some
  898. micro-oriented network product and TCP/IP.
  899.  
  900. In this section, Apple's AppleTalk is used as an  example.    This  is
  901. because  gateways  for  it  have  existed  for  some  time, and are in
  902. widespread use.  However similar  products  exist  for  several  other
  903. micro  network  technologies.   Note that the term AppleTalk refers to
  904. the Apple network protocols, whereas LocalTalk refers to the  specific
  905. twisted-pair  technology on which AppleTalk was initially implemented.
  906. Thus AppleTalk is analogous to the TCP/IP protocols, whereas LocalTalk
  907. is analogous to the Ethernet medium.
  908.  
  909. Several  vendors  supply  gateways to connect AppleTalk running over a
  910. LocalTalk network with IP running over Ethernet.  Although  there  are
  911. several  products  of  this  kind,  most  of them supply the following
  912. services:
  913.  
  914.    - TCP/IP applications on the PC can connect to  TCP/IP  systems  on
  915.      the  Ethernet.    Special  facilities  are  defined  to  allow IP
  916.      datagrams to be carried over LocalTalk between  the  PC  and  the
  917.      gateway.   TCP/IP applications on the PC have to be written using
  918.      a special library that uses a mixture of  AppleTalk  and  TCP/IP.
  919.      The  AppleTalk  facilities are needed to get the datagrams to the
  920.      gateway, where they are transformed into pure TCP/IP before being
  921.      put  out  onto  the  Ethernet.    Thus  the TCP/IP systems on the
  922.      Ethernet don't know they are talking to micros.
  923.  
  924.    - AppleTalk applications can be written for larger systems, so that
  925.      PC's  can  use  them  as servers.  These applications are written
  926.      using a special library that is more or less the reverse  of  the
  927.      one  just  described.   Again, it uses a mixture of AppleTalk and
  928.      TCP/IP.  But this time TCP/IP facilities are needed  to  get  the
  929.      datagrams  to  the  gateway, where they are transformed into pure
  930.      AppleTalk  before  being  put  onto  the  LocalTalk  network   to
  931.      communicate with the PC's.  Thus the PC's can access applications
  932.      on the larger systems, without  knowing  that  they  are  on  the
  933.      Ethernet rather than an Apple network.
  934.                                   14
  935.  
  936.  
  937.  
  938.    - A campus or corporate IP network can be used to connect AppleTalk
  939.      networks at different locations.  Gateways at each location  wrap
  940.      up  AppleTalk  datagrams  inside IP datagrams, and send them over
  941.      the main IP network.
  942.  
  943. In addition, some newer gateways will  translate  at  the  application
  944. level.    For  example  one  gateway  will translate between the Apple
  945. filing protocol and Sun's Network File System.  This allows  a  PC  to
  946. access  a  Unix  file  system,  with  the  PC  using  the Apple filing
  947. protocol, and the final access to the Unix  system  being  done  using
  948. Sun's Network File System.
  949.  
  950. Unfortunately  the  flexibility  of products like this also means that
  951. they are complex.  Addressing  issues  are  particularly  complicated.
  952. For  the  same  reasons  as  SLIP, these gateways often use dynamic IP
  953. address allocation. A range  of  IP  addresses  is  assigned  to  each
  954. gateway.   When a PC attempts to open its first TCP/IP connection, the
  955. gateway picks a free IP address and assigns it  to  the  PC.  As  with
  956. SLIP,  you  will often need to choose whether you want addresses to be
  957. assigned this way, or you want  each  PC  to  have  its  own  address.
  958. Again,  this  depends upon how many PC's you have and whether you have
  959. applications which must be able to use the IP address to identify  the
  960. particular PC that is talking to it.
  961.  
  962. Addressing  is  further complicated by the fact that AppleTalk has its
  963. own addressing structure.   So  you  must  define  a  mapping  between
  964. AppleTalk  and  IP  network  numbers.    There  must also be a mapping
  965. between individual IP addresses  and  AppleTalk  addresses,  but  this
  966. mapping is maintained dynamically by the gateways.
  967.  
  968.  
  969.  
  970. 4. Network-wide Services, Naming
  971.  
  972.  
  973. If  you  are  going to have a TCP/IP network, there are certain things
  974. that you are going to have to do centrally.  Some of them  are  simply
  975. administrative.    The  most  important  is  that  you  will a central
  976. registry of names and IP  addresses.    The  DDN  Network  Information
  977. Center performs this role for the Internet network as a whole.  If you
  978. are connected to the international Internet, your  administrator  will
  979. need  to  register  with  the  DDN Network Information Center, so that
  980. queries from other institutions about your hosts are forwarded to your
  981. servers.
  982.  
  983. You will want to maintain a database containing information about each
  984. system on your network.  At a minimum, you need to have the host  name
  985. and  IP  address  for each system.  Probably the central registry will
  986. assign IP addresses.  If your network is  subnetted,  or  if  you  use
  987. multiple  class  C  network numbers, the registry will probably assign
  988. network numbers to new networks or subnets.  Most commonly, individual
  989. host  administrators  will  be allowed to choose their own host names.
  990. However the registry must at least verify that there are no  duplicate
  991. names.    If you have a very large network, you may choose to delegate
  992. some  of  these  tasks  to  subregistries,  possibly  one   for   each
  993.                                   15
  994.  
  995.  
  996.  
  997. department.
  998.  
  999. We  suggest that you assign numbers in the simplest way: starting from
  1000. 1.  Thus if your network is 128.6, you would assign  128.6.1  as  your
  1001. first subnet, 128.6.2 as the second, etc.  IP addresses for individual
  1002. hosts should probably start at 2.  This allows you  to  reserve  1  on
  1003. each  subnet  for  use  by  a  gateway.  Thus the first host on subnet
  1004. 128.6.4 would be 128.6.4.2, the next  128.6.4.3,  etc.    There  is  a
  1005. specific  reason  for  keeping addresses as small as possible.  If you
  1006. have a large organization, you may run out of subnet numbers.  If  you
  1007. do, and if your host numbers are small, you can assign another bit for
  1008. the subnet.  For example, we use the entire third octet  as  a  subnet
  1009. number.  As long as all of our host numbers are less than 128, we will
  1010. be able to expand to  9-bit  subnet  numbers.    For  example,  subnet
  1011. 128.6.4  would  be  split  into  two  separate  subnets, 128.6.4.0 and
  1012. 128.6.4.128.  If we had assigned host numbers above  128,  this  split
  1013. would be impossible.
  1014.  
  1015. Host  names need not be so systematic.  They can start with almost any
  1016. word made up of letters numbers, and hyphens.  It is  safest  for  the
  1017. first  character  to  be a letter.  It will be easier for users if the
  1018. name is fairly short.  (We have seen software that has trouble dealing
  1019. with  names  longer  than  16  characters.)  Many times departments or
  1020. projects choose a theme, and pick names that are consistent with them.
  1021. For  example,  the machines used by computer science graduate students
  1022. at Rutgers are named after rock bands:  STEELEYE,  BAND,  TREX,  DEVO,
  1023. etc.    Our math department uses famous mathematicians: GAUSS, FERMAT,
  1024. etc.  If your institution  does  not  have  any  connection  with  the
  1025. outside world, such one-word names are all you need.
  1026.  
  1027. If  you  are  connected  to  with  the  international  Internet,  your
  1028. organization will need to get a "domain name."  This  is  assigned  to
  1029. you by the DDN Network Information Center, just as your network number
  1030. is.  Unlike the network number, you can get along without one if  your
  1031. network  is isolated.  If you find later that you need one, it is easy
  1032. to add a domain name.  (We recommend that you start with  an  official
  1033. network  number  from  the  beginning because changing network numbers
  1034. later can be traumatic.)   Domain  names  normally  end  in  .EDU  for
  1035. educational  institutions,  .COM  for  companies,  etc.   For example,
  1036. Rutgers  University  has  a  domain  name  of  .RUTGERS.EDU   A   full
  1037. domain-style  host  name  consists  of  your  one-word  internal  name
  1038. followed by  your  organization's  domain  name.    For  example,  the
  1039. computer  I normally use is known internally as ATHOS.  It's full name
  1040. is ATHOS.RUTGERS.EDU If you have a large organization, it is  possible
  1041. to have sub-domains.  For example, you might have a subdomain for each
  1042. department.  This adds another period to your names.  For example, the
  1043. computer  science department might have decided to create a subdomain.
  1044. In   this   case,   my   computer    would    probably    be    called
  1045. ATHOS.CS.RUTGERS.EDU Once you get a domain name assigned to you, it is
  1046. wise to change all of your configuration files so that the  full  form
  1047. of  name  is  used.    However your software can be set up so that the
  1048. one-word versions are accepted as nicknames.    That  way  your  users
  1049. don't have to type out the long form.
  1050.  
  1051. If  you  have more than one or two systems, you are going to need some
  1052.                                   16
  1053.  
  1054.  
  1055.  
  1056. way to keep host information up  to  date  on  all  of  your  systems.
  1057. TCP/IP  software  needs  to  be  able  to translate host names into IP
  1058. addresses.  When a user tries to connect to another system,  he  wants
  1059. to  be able to refer to it by name.  The software has to translate the
  1060. name into the IP address in  order  to  open  the  connection.    Most
  1061. software  provides two ways to do this translation:  a static table or
  1062. a name server.  The  table  approach  is  probably  easier  for  small
  1063. organizations, as long as they are not connected to any other network.
  1064. You simply create a file that lists the names  and  addresses  of  all
  1065. your hosts.  Here's part of our host table:
  1066.  
  1067.     HOST: 128.6.4.2, 128.6.25.2 : ARAMIS.RUTGERS.EDU,ARAMIS : SUN-3-28
  1068.     HOST: 128.6.4.3 : GAUSS.RUTGERS.EDU,GAUSS : SUN-3-180 : UNIX ::
  1069.     HOST: 128.6.4.4, 128.6.25.4 : ATHOS.RUTGERS.EDU,ATHOS : SUN-4-280 
  1070.  
  1071. This  format  has  one  line for each system, and lists its addresses,
  1072. names, and other information about it.  Note that aramis and athos are
  1073. both  on  two  networks,  so  they have two addresses.  They have both
  1074. primary names, e.g. ARAMIS.RUTGERS.EDU, and nicknames, e.g.    ARAMIS.
  1075. Since  we  are  attached  to  the Internet, our primary name is a full
  1076. domain name.  We supply brief nicknames to  make  it  easier  for  our
  1077. users.    There  is one other commonly-used format for the host table.
  1078. Here's an example of that format:
  1079.  
  1080.     128.6.4.2   aramis.rutgers.edu aramis
  1081.     128.6.25.2  aramis.rutgers.edu aramis
  1082.     128.5.4.3   gauss.rutgers.edu gauss
  1083.     128.6.4.4   athos.rutgers.edu gauss
  1084.     128.6.25.4  athos.rutgers.edu gauss
  1085.  
  1086. In this format, each line represents a single IP address. If a  system
  1087. has  two  interfaces,  there  are  two lines in the table for it.  You
  1088. should try to put the address first that is likely  to  be  used  more
  1089. often.  The documentation for your systems should indicate what format
  1090. they want the host information to use.
  1091.  
  1092. In the simplest setup, every computer has its own  copy  of  the  host
  1093. table.    If  you  choose  to  use  the setup, you will want to set up
  1094. procedures to make sure that systems get updated copies  of  the  host
  1095. table regularly.
  1096.  
  1097. Larger sites, and all sites that are connected to the Internet, should
  1098. use name servers instead of individual host tables.  A name server  is
  1099. a  program  that  you  run  on  a few of your systems to keep track of
  1100. names.  When a program needs to look up a name, instead of looking for
  1101. a copy of the host table, it sends a network query to the name server.
  1102. This approach has two advantages:
  1103.  
  1104.    - For a large site, it is easier to keep tables up to date on a few
  1105.      name servers than on every system.
  1106.  
  1107.    - If  your site is connected to the Internet, your name server will
  1108.      be able to talk to name servers at other organizations, and  look
  1109.      up names elsewhere.
  1110.  
  1111.                                   17
  1112.  
  1113.  
  1114.  
  1115. Using  a  name  server is the only way to have access to complete host
  1116. information about the rest of the Internet.
  1117.  
  1118. It is important to understand the difference between a name server and
  1119. a resolver.  A name server is a program that accesses a host database,
  1120. and answers queries from other programs.   A  resolver  is  a  set  of
  1121. subroutines  that  can  be  loaded  with  your  program.  It generates
  1122. queries to the name server, and processes the responses.  Every system
  1123. should  use the resolver.  (Actually, the resolver is generally loaded
  1124. with each program that uses the network, since it's simply  a  set  of
  1125. subroutines.)   You only need a few name servers.  Many people confuse
  1126. these two concepts, and come to believe that every computer  needs  to
  1127. run a name server.
  1128.  
  1129. In  order  to  use a resolver, each computer will need a configuration
  1130. file or other option that specifies the address of a name server where
  1131. queries  should  be  sent.   Generally you should specify several name
  1132. servers, in case one of them is down.  If your system cannot reach any
  1133. name  server,  much of your software is likely to misbehave.  Thus you
  1134. should be very careful to have enough name servers around  that  every
  1135. system can always reach at least one name server.
  1136.  
  1137. Name servers generally have a number of configuration options.  Rather
  1138. than giving advice here on setting up a name server,  I  am  going  to
  1139. refer  you  to  two  official  Internet standards documents.  Both are
  1140. available from the DDN Network Information Center, SRI  International,
  1141. 333  Ravenswood  Avenue,  Menlo  Park,  California  94025  (telephone:
  1142. 800-235-3155).  RFC 1032 contains instructions for  getting  a  domain
  1143. name  from  the  Network  Information  Center, including the necessary
  1144. forms.  RFC 1033 contains instructions on how to set up a name server.
  1145. Like  this  document,  these  documents are conceptual.  You will also
  1146. need documentation for the specific name server software that you  are
  1147. going  to use.  [This paragraph is a cop-out.  Future editions of this
  1148. document will contain  some  advice  on  setting  up  a  name  server.
  1149. However  RFC  1033  is  almost  unique  in  that  it  is  directed  at
  1150. administrators rather than networking experts.  Thus it is  reasonable
  1151. to direct people there for the moment.]
  1152.  
  1153. In  some cases you may need to use both fixed tables and name servers.
  1154. If you have some TCP/IP implementations that do not include resolvers,
  1155. then  you  will  have  to have host tables for those systems.  If your
  1156. network is connected to the international Internet, you are  going  to
  1157. have problems with systems that don't have resolvers.  The Internet is
  1158. too big for there to be a host table that  lists  all  of  its  hosts.
  1159. Thus you will have to put together a host table that lists those hosts
  1160. that your users tend to use.    The  DDN  Network  Information  Center
  1161. maintains a host table that will be a good starting point.  However it
  1162. is by no means complete.  So you will have to add your users' favorite
  1163. hosts  to it.  Systems that use a resolver will not have this problem,
  1164. since the name servers are able to translate any legal host name.
  1165.  
  1166. Host name and number allocation is the only facility that  has  to  be
  1167. done centrally.  However there are other things that you may prefer to
  1168. do centrally.  It is very common to have one  or  two  computers  that
  1169. handle  all  computer  mail.    If are on the Internet, it is easy for
  1170.                                   18
  1171.  
  1172.  
  1173.  
  1174. every one of your computers to talk directly to any other computer  on
  1175. the  Internet.    However  most  institutions want to communicate with
  1176. systems on other networks, such as  Bitnet  and  Usenet.    There  are
  1177. gateways  between  the  various  networks.    But  choosing  the right
  1178. gateway, and transforming  computer  mail  addresses  correctly  is  a
  1179. rather  specialized  business.  Thus many sites set up the appropriate
  1180. software only one place and direct all external mail (or all  external
  1181. mail to hosts that are not on the Internet) through this system.
  1182.  
  1183.  
  1184.  
  1185. 5. Setting up routing for an individual computer
  1186.  
  1187.  
  1188. All  TCP/IP  implementations require some configuration for each host.
  1189. In some cases this is done  during  "system  generation".    In  other
  1190. cases,  various  startup and configuration files must be set up on the
  1191. system.  Still other systems get configuration information across  the
  1192. network  from  a "server".  While the details differ, the same kind of
  1193. information needs to be  supplied  for  most  implementations.    This
  1194. includes
  1195.  
  1196.    - parameters  describing  the  specific  machine,  such  as  its IP
  1197.      address.
  1198.  
  1199.    - parameters describing the network, such as the  subnet  mask  (if
  1200.      any)
  1201.  
  1202.    - routing software and the tables that drive it
  1203.  
  1204.    - startup of various programs needed to handle network tasks
  1205.  
  1206. Before  a  machine  is installed on your network, a coordinator should
  1207. assign it a host name and IP address, as described above.    Once  you
  1208. have  name  and  address,  you  are  ready  to  start configuring your
  1209. computer.  Often  you  have  to  put  the  address  and  name  into  a
  1210. configuration   file   on   the  computer.    However  some  computers
  1211. (particularly those without permanent  disks  on  which  configuration
  1212. information  could  be  stored) get this information over the network.
  1213. When such a system starts, it broadcasts a request over  the  network.
  1214. In  effect,  this  request says "who am I?"  If you have any computers
  1215. like this, you will have to make sure that some system on your network
  1216. is  ready  to  answer  these questions.  The obvious issue is: how can
  1217. another system tell who you are?  Generally  this  is  done  based  on
  1218. Ethernet  address  (or  the  analogous  address  for  other  types  of
  1219. network).    Ethernet  addresses  are   assigned   by   the   computer
  1220. manufacturer.    It  is guaranteed that only one machine in the entire
  1221. world has any particular Ethernet address.  The  address  is  normally
  1222. stored  in ROM somewhere in the machine.  The machine may not know its
  1223. IP address, but it does know its Ethernet address.  Thus the  "who  am
  1224. I"  request includes the Ethernet address.  Systems that are set up to
  1225. answer such requests have a table that lists  Ethernet  addresses  and
  1226. the  corresponding  IP  address.    This lets them know how to answer.
  1227. Unfortunately, you have to set this table up manually.  Generally  you
  1228. know the IP address, because your address coordinator has assigned it.
  1229.                                   19
  1230.  
  1231.  
  1232.  
  1233. The only problem in constructing the table will  be  finding  out  the
  1234. Ethernet address for each computer.  Generally, computers are designed
  1235. so that they print the Ethernet address on the console  shortly  after
  1236. being  turned on.  However in some cases you may have to find a way to
  1237. bring  the  computer  up  and  then  type  a  command  that   displays
  1238. information about the Ethernet interface.
  1239.  
  1240. Generally  the subnet mask should be specified in a configuration file
  1241. associated with the computer.    (For  Unix  systems,  the  "ifconfig"
  1242. command is used to specify both the Internet address and subnet mask.)
  1243. However there are provisions in the IP protocols  for  a  computer  to
  1244. broadcast a request asking for the subnet mask.  The subnet mask is an
  1245. attribute of the network.  It is the same for all computers on a given
  1246. subnet.    Thus there is no separate subnet table corresponding to the
  1247. Ethernet/Internet  address  mapping  table  used  to  answer   address
  1248. queries.    Ideally,  only  a  few authoritative computers will answer
  1249. queries about the subnet mask.  However  many  TCP/IP  implementations
  1250. are  set  up so that any machine on the network that believes it knows
  1251. the subnet mask will  answer.    If  your  TCP/IP  is  like  this,  an
  1252. incorrect  subnet  mask  setting  on  one  machine can cause confusion
  1253. throughout the network.
  1254.  
  1255. Normally the startup files do roughly the following things:
  1256.  
  1257.    - load any special device drivers that may be necessary.  (This  is
  1258.      particularly  common with PC's, where network access is likely to
  1259.      depend upon add-on controller cards and software that is not part
  1260.      of the original operating system.)
  1261.  
  1262.    - enable each of the network interfaces (Ethernet interface, serial
  1263.      lines, etc.)   Normally  this  involves  specifying  an  Internet
  1264.      address  and  subnet mask for each, as well as other options that
  1265.      will be described in your vendor's documentation.
  1266.  
  1267.    - establish network routing information, either  by  commands  that
  1268.      add  fixed  routes,  or  by  starting a program that obtains them
  1269.      dynamically.
  1270.  
  1271.    - turn on the domain system (used for looking up names and  finding
  1272.      the  corresponding  Internet  address  --  see the section on the
  1273.      domain system in the Introduction to  TCP/IP).    Note  that  the
  1274.      details  of  this  will  depend  upon  how  the  domain system is
  1275.      configured.  In most cases only a few hosts actually  run  domain
  1276.      name  servers  that  must  be  started.   Other hosts simply need
  1277.      configuration files that specify where the nearest name server is
  1278.      located.
  1279.  
  1280.    - set various other information needed by the system software, such
  1281.      as the name of the system itself.
  1282.  
  1283.    - start various "daemons".  These are programs that provide network
  1284.      services  to  other  systems on the network, and to users on this
  1285.      system.  In the case of PC's, which  often  cannot  run  multiple
  1286.      processes,  similar  facilities  may  be  provided  by  so-called
  1287.      "TSR"'s, or they may be built into the device drivers.
  1288.                                   20
  1289.  
  1290.  
  1291.  
  1292. It is not practical to document these  steps  in  detail,  since  they
  1293. differ for each vendor.  This section will concentrate on a few issues
  1294. where your choice will depend upon overall decisions  about  how  your
  1295. network  is  to  operate.   These overall network policy decisions are
  1296. often not as well documented by the vendors as the details of  how  to
  1297. start  specific  programs.    Note that some care will be necessary to
  1298. integrate commands that you add for routing, etc.,  into  the  startup
  1299. sequence  at  the  right  point.  Some of the most mysterious problems
  1300. occur when network routing is not set up before  a  program  needs  to
  1301. make  a  network  query,  or when a program attempts to look up a host
  1302. name before the name server has finished loading all of the names from
  1303. a master name server.
  1304.  
  1305.  
  1306.  
  1307. 5.1 How datagrams are routed
  1308.  
  1309.  
  1310. If your system consists of a single Ethernet or similar medium, you do
  1311. not need to give routing much attention.   However  for  more  complex
  1312. systems,  each  of  your  machines  needs a routing table that lists a
  1313. gateway and interface to use for every possible  destination  network.
  1314. A  simple  example of this was given at the beginning of this section.
  1315. However it is now necessary to describe the way routing works in a bit
  1316. more  detail.  On most systems, the routing table looks something like
  1317. the following. (This example was taken from a system running  Berkeley
  1318. Unix,  using  the  command  "netstat  -n -r".  Some columns containing
  1319. statistical information have been omitted.)
  1320.  
  1321.     Destination          Gateway              Flags       Interface
  1322.  
  1323.     128.6.5.3            128.6.7.1            UHGD        il0
  1324.     128.6.5.21           128.6.7.1            UHGD        il0
  1325.     127.0.0.1            127.0.0.1            UH          lo0
  1326.     128.6.4              128.6.4.61           U           pe0
  1327.     128.6.6              128.6.7.26           U           il0
  1328.     128.6.7              128.6.7.26           U           il0
  1329.     128.6.2              128.6.7.1            UG          il0
  1330.     10                   128.6.4.27           UG          pe0
  1331.     128.121              128.6.4.27           UG          pe0
  1332.     default              128.6.4.27           UG          pe0
  1333.  
  1334. The example system is connected to two Ethernets:
  1335.  
  1336.       controller  network   address     other networks
  1337.          il0      128.6.7   128.6.7.26    128.6.6
  1338.          pe0      128.6.4   128.6.4.61    none
  1339.  
  1340. The first column shows the name  for  the  Ethernet  interface.    The
  1341. second  column  is  the  network  number for that Ethernet.  The third
  1342. column is this computer's Internet address on that network.  The  last
  1343. column shows other subnets that share the same physical network.
  1344.  
  1345. Now  let's  look  at the routing table.  For the moment, let us ignore
  1346. the first 3 lines.  The majority of the table consists  of  a  set  of
  1347.                                   21
  1348.  
  1349.  
  1350.  
  1351. entries  describing  networks.    For  each  network,  the other three
  1352. columns show where to send datagrams destined for that  network.    If
  1353. the  "G"  flag  is  present  in  the  third column, datagrams for that
  1354. network must be sent through a gateway.  The second column  shows  the
  1355. address  of  the  gateway to be used.  If the "G" flag is not present,
  1356. the computer is directly connected to the network  in  question.    So
  1357. datagrams  for  that network should be sent using the controller shown
  1358. in the third column.    The  "U"  flag  in  the  third  column  simply
  1359. indicates  that  the route specified by that line is up.  (Generally a
  1360. route is assumed to be up  unless  attempts  to  use  it  consistently
  1361. result in errors.)
  1362.  
  1363. The  first  3  lines  show "host routes", indicated by the "H" flag in
  1364. column three.    Routing  tables  normally  have  entries  for  entire
  1365. networks or subnets.  For example, the entry
  1366.  
  1367.     128.6.2              128.6.7.1            UG          il0
  1368.  
  1369. indicates  that  datagrams  for  any computer on network 128.6.2 (i.e.
  1370. addresses 128.6.2.1 through 128.6.2.254) should  be  sent  to  gateway
  1371. 128.6.7.1  for  forwarding.   However sometimes routes apply only to a
  1372. specific computer, rather than to a whole network.  In  that  case,  a
  1373. host  route  is used.  The first column then shows a complete address,
  1374. and the "H" flag is present in column 3.  E.g. the entry
  1375.  
  1376.     128.6.5.21           128.6.7.1            UHGD        il0
  1377.  
  1378. indicates that datagrams for the specific address 128.6.5.21 should be
  1379. sent  to  the gateway 128.6.7.1.  As with network routes, the "G" flag
  1380. is used for routes that involve a gateway.   The  "D"  flag  indicates
  1381. that  the  route  was  added  dynamically,  based  on an ICMP redirect
  1382. message from a gateway.  (See below for details.)
  1383.  
  1384. The following route is special:
  1385.  
  1386.     127.0.0.1            127.0.0.1            UH          lo0
  1387.  
  1388. 127.0.0.1 is the address of the "loopback device".  This  is  a  dummy
  1389. software  module.  Any datagram sent out through that "device" appears
  1390. immediately as input.  It can be  used  for  testing.    The  loopback
  1391. address  can  also  handy for talking to applications that are on your
  1392. own computer.  (Why bother to use your network to talk  to  a  program
  1393. that is on the same machine you are?)
  1394.  
  1395. Finally, there are "default" routes, e.g.
  1396.  
  1397.     default              128.6.4.27           UG          pe0
  1398.  
  1399. This route is used for datagrams that don't match any other entry.  In
  1400. this case, they are sent to a gateway with address 128.6.4.27.
  1401.  
  1402. In most systems, datagrams are routed by looking  up  the  destination
  1403. address  in  a  table  such as the one just described.  If the address
  1404. matches a specific host route, then that is used.   Otherwise,  if  it
  1405. matches  a  network route, that is used.  If no other route works, the
  1406.                                   22
  1407.  
  1408.  
  1409.  
  1410. default is used.  If there is no default, the user should get an error
  1411. message such as "network is unreachable".
  1412.  
  1413. The  following sections will describe several ways of setting up these
  1414. routing tables.  Generally, the actual operation of sending  datagrams
  1415. doesn't depend upon which method you use to set up the routes.  When a
  1416. datagram is to be sent, its destination is looked  up  in  the  table.
  1417. The  different  routing methods are simply more and less sophisticated
  1418. ways of setting up and maintaining the tables.
  1419.  
  1420.  
  1421.  
  1422. 5.2 Fixed routes
  1423.  
  1424.  
  1425. The simplest way to set up routing is to use  fixed  commands.    Your
  1426. startup  files  contain  commands to set up the routing table.  If any
  1427. changes are needed, you make them manually, using  commands  that  add
  1428. and  delete  entries  in  the  routing  table.   (When you make such a
  1429. change, don't forget to update the startup files also.)   This  method
  1430. is practical for relatively small networks, particularly if they don't
  1431. change very often.
  1432.  
  1433. Most computers automatically set up  some  routing  entries  for  you.
  1434. Unix  will  add  an  entry  for the networks to which you are directly
  1435. connected.  For example, your startup file might contain the commands
  1436.  
  1437.       ifconfig ie0 128.6.4.4 netmask 255.255.255.0
  1438.       ifconfig ie1 128.6.5.35 netmask 255.255.255.0
  1439.  
  1440. These  specify  that  there  are  two  network  interfaces,  and  your
  1441. addresses on them.  The system will automatically create routing table
  1442. entries
  1443.  
  1444.     128.6.4              128.6.4.4            U           ie0
  1445.     128.6.5              128.6.5.35           U           ie1
  1446.  
  1447. These specify that  datagrams  for  the  local  subnets,  128.6.4  and
  1448. 128.6.5, should be sent out the corresponding interface.
  1449.  
  1450. In  addition  to  these,  your startup files would contain commands to
  1451. define routes to whatever other networks you wanted  to  reach.    For
  1452. example,
  1453.  
  1454.       route add 128.6.2.0 128.6.4.1  1
  1455.       route add 128.6.6.0 128.6.5.35 0
  1456.  
  1457. These  commands  specify  that  in  order  to reach network 128.6.2, a
  1458. gateway at address 128.6.4.1 should be used, and that network  128.6.6
  1459. is  actually  an  additional  network  number for the physical network
  1460. connected to interface 128.6.5.35.   Some  other  software  might  use
  1461. different  commands  for these cases.  Unix differentiates them by the
  1462. "metric", which is the number at the end of the command.   The  metric
  1463. indicates  how  many  gateways the datagram will have to go through to
  1464. get to the destination.  Routes with metrics of 1 or  greater  specify
  1465.                                   23
  1466.  
  1467.  
  1468.  
  1469. the  address of the first gateway on the path.  Routes with metrics of
  1470. 0 indicate that no gateway  is  involved  --  this  is  an  additional
  1471. network number for the local network.
  1472.  
  1473. Finally, you might define a default route, to be used for destinations
  1474. not listed explicitly.  This would normally  show  the  address  of  a
  1475. gateway   that   has   enough   information  to  handle  all  possible
  1476. destinations.
  1477.  
  1478. If your network has only one gateway attached to it,  then  of  course
  1479. all  you  need is a single entry pointing to it as a default.  In that
  1480. case, you need not worry further about  setting  up  routing  on  your
  1481. hosts.    (The  gateway  itself needs more attention, as we will see.)
  1482. The following sections are intended to provide  help  for  setting  up
  1483. networks where there are several different gateways.
  1484.  
  1485.  
  1486.  
  1487. 5.3 Routing redirects
  1488.  
  1489.  
  1490. Most  TCP/IP  experts  recommend  leaving  routing  decisions  to  the
  1491. gateways.  That is, it is probably a bad  idea  to  have  large  fixed
  1492. routing  tables  on each computer.  The problem is that when something
  1493. on the network changes, you have to go around to  many  computers  and
  1494. update  the  tables.    If  changes  happen  because a line goes down,
  1495. service may not be restored until someone has a chance to  notice  the
  1496. problem and change all the routing tables.
  1497.  
  1498. The  simplest way to keep routes up to date is to depend upon a single
  1499. gateway to update your routing tables.  This gateway should be set  as
  1500. your  default.  (On Unix, this would mean a command such as "route add
  1501. default  128.6.4.27  1",  where  128.6.4.27  is  the  address  of  the
  1502. gateway.)   As described above, your system will send all datagrams to
  1503. the default when it doesn't have any better route.    At  first,  this
  1504. strategy  does  not sound very good if you have more than one gateway.
  1505. After all, if all you have is a single default  entry,  how  will  you
  1506. ever  use  the other gateways in the cases where they are better?  The
  1507. answer is that most gateways are able to send  "redirects"  when  they
  1508. get  datagrams  for  which  there  is a better route.  A redirect is a
  1509. specific kind of message using  the  ICMP  (Internet  Control  Message
  1510. Protocol).    It contains information that generally translates to "In
  1511. the future, to get to address XXXXX, please use gateway YYYYY  instead
  1512. of  me".    Correct  TCP/IP implementations use these redirects to add
  1513. entries to their routing table.  Suppose your routing table starts out
  1514. as follows:
  1515.  
  1516.     Destination          Gateway              Flags       Interface
  1517.  
  1518.     127.0.0.1            127.0.0.1            UH          lo0
  1519.     128.6.4              128.6.4.61           U           pe0
  1520.     default              128.6.4.27           UG          pe0
  1521.  
  1522. This  contains  an entry for the local network, 128.6.4, and a default
  1523. pointing to the gateway 128.6.4.27.  Suppose there is also  a  gateway
  1524.                                   24
  1525.  
  1526.  
  1527.  
  1528. 128.6.4.30,  which  is the best way to get to network 128.6.7.  How do
  1529. you find it?  Suppose you have datagrams to send to 128.6.7.23.    The
  1530. first  datagram  will go to the default gateway, since that's the only
  1531. thing in the routing table.  However the default gateway,  128.6.4.27,
  1532. will  notice  that 128.6.4.30 would really be a better route.  (How it
  1533. does that is up to the gateway.  However there are some fairly  simple
  1534. methods  for a gateway to determine that you would be better off using
  1535. a  different  one.)    Thus  128.6.4.27  will  send  back  a  redirect
  1536. specifying   that   datagrams   for  128.6.7.23  should  be  sent  via
  1537. 128.6.4.30.  Your TCP/IP software will add a routing entry
  1538.  
  1539.     128.6.7.23           128.6.4.30           UDHG         pe0
  1540.  
  1541. Any future datagrams for 128.6.7.23  will  be  sent  directly  to  the
  1542. appropriate gateway.
  1543.  
  1544. This  strategy  would  be a complete solution, if it weren't for three
  1545. problems:
  1546.  
  1547.    - It requires each computer to have  the  address  of  one  gateway
  1548.      "hardwired" into its startup files, as the initial default.
  1549.  
  1550.    - If a gateway goes down, routing table entries using it may not be
  1551.      removed.
  1552.  
  1553.    - If your network uses subnets, and your TCP/IP implementation does
  1554.      not handle them, this strategy will not work.
  1555.  
  1556. How  serious  the  first  problem is depends upon your situation.  For
  1557. small networks, there is no problem modifying startup  files  whenever
  1558. something  changes.   But some organizations can find it very painful.
  1559. If network topology changes, and a gateway  is  removed,  any  systems
  1560. that  have  that  gateway  as their default must be adjusted.  This is
  1561. particularly serious if the people who maintain the  network  are  not
  1562. the  same  as  those  maintaining  the individual systems.  One simple
  1563. appoach is to make sure that the default address never changes.    For
  1564. example,  you might adopt the convention that address 1 on each subnet
  1565. is the default gateway for  that  subnet.    For  example,  on  subnet
  1566. 128.6.7,  the  default  gateway  would  always  be 128.6.7.1.  If that
  1567. gateway is ever removed, some other gateway  is  given  that  address.
  1568. (There  must  always  be  at least one gateway left to give it to.  If
  1569. there isn't, you are completely cut off anyway.)
  1570.  
  1571. The biggest problem with the description given so far is that it tells
  1572. you how to add routes but not how to get rid of them.  What happens if
  1573. a gateway goes down?  You want traffic to  be  redirected  back  to  a
  1574. gateway  that is up.  Unfortunately, a gateway that has crashed is not
  1575. going to issue Redirects.  One solution is  to  choose  very  reliable
  1576. gateways.  If they crash very seldom, this may not be a problem.  Note
  1577. that Redirects can be used to handle some kinds  of  network  failure.
  1578. If  something  fails  in  a  distant part of the network, your current
  1579. route may no longer be a good one.  As long as the  gateway  to  which
  1580. you  are talking is still up and talking to you, it can simply issue a
  1581. Redirect to the gateway that is now the best one.  However  you  still
  1582. need  a  way  to  detect  failure  of one of the gateways that you are
  1583.                                   25
  1584.  
  1585.  
  1586.  
  1587. talking to directly.
  1588.  
  1589. The best approach for handling failed  gateways  is  for  your  TCP/IP
  1590. implementation  to  detect  routes  that  have  failed.  TCP maintains
  1591. various timers that allow the software to detect when a connection has
  1592. broken.    When  this  happens, one good approach is to mark the route
  1593. down, and go back to the default gateway.  A similar approach can also
  1594. be used to handle failures in the default gateway.  If you have marked
  1595. two gateways as default,  then  the  software  should  be  capable  of
  1596. switching   when   connections   using  one  of  them  start  failing.
  1597. Unfortunately, some common TCP/IP implementations do not  mark  routes
  1598. as down and change to new ones.  In particular, Berkeley 4.2 Unix does
  1599. not.  However Berkeley 4.3 Unix does do this,  and  as  other  vendors
  1600. begin  to  base  products  on  4.3  rather  than  4.2, this ability is
  1601. expected to become more common.
  1602.  
  1603.  
  1604.  
  1605. 5.4 Other ways for hosts to find routes
  1606.  
  1607.  
  1608. As long as your  TCP/IP  implementations  handle  failing  connections
  1609. properly, establishing one or more default routes in the configuration
  1610. file is likely to be the simplest way  to  handle  routing.    However
  1611. there  are two other routing approaches that are worth considering for
  1612. special situations:
  1613.  
  1614.    - spying on the routing protocol
  1615.  
  1616.    - using proxy ARP
  1617.  
  1618.  
  1619.  
  1620. 5.4.1 Spying on Routing
  1621.  
  1622.  
  1623. Gateways generally  have  a  special  protocol  that  they  use  among
  1624. themselves.     Note  that  redirects  cannot  be  used  by  gateways.
  1625. Redirects are simply ways for gateways to tell "dumb" hosts to  use  a
  1626. different  gateway.    The  gateways  themselves  must have a complete
  1627. picture of the network, and a way to compute the optimal route to each
  1628. subnet.      Generally   they  maintain  this  picture  by  exchanging
  1629. information among themselves.  There  are  several  different  routing
  1630. protocols  in  use  for  this purpose.  One way for a computer to keep
  1631. track of gateways is for it to listen to the gateways' messages  among
  1632. themselves.   There is software available for this purpose for most of
  1633. the common routing protocols.    When  you  run  this  software,  your
  1634. computer  will maintain a complete picture of the network, just as the
  1635. gateways do.  The software is  generally  designed  to  maintain  your
  1636. computer's  routing  tables  dynamically, so that datagrams are always
  1637. sent to the proper gateway.  In effect, the  routing  software  issues
  1638. the  equivalent of the Unix "route add" and "route delete" commands as
  1639. the network topology changes.  Generally this results  in  a  complete
  1640. routing  table,  rather  than  one  that  depends upon default routes.
  1641. (This assumes that the gateways themselves maintain a complete  table.
  1642.                                   26
  1643.  
  1644.  
  1645.  
  1646. Sometimes  gateways  keep track of your campus network completely, but
  1647. use a default route for all off-campus networks, etc.)
  1648.  
  1649. Running routing software on each host does in some sense  "solve"  the
  1650. routing  problem.    However there are several reasons why this is not
  1651. normally recommended except as  a  last  resort.    The  most  serious
  1652. problem  is  that this reintroduces configuration options that must be
  1653. kept up to date on each host.  Any computer that wants to  participate
  1654. in the protocol among the gateways will need to configure its software
  1655. compatibly  with  the  gateways.      Modern   gateways   often   have
  1656. configuration  options  that  are  complex  compared  with those of an
  1657. individual host.  It is undesirable to spread these to every host.
  1658.  
  1659. There is a somewhat more specialized  problem  that  applies  only  to
  1660. diskless  computers.   By its very nature, a diskless computer depends
  1661. upon the network and file servers to load programs and to do swapping.
  1662. It  is  dangerous  for  diskless  computers  to  run any software that
  1663. listens to network broadcasts.   Routing  software  generally  depends
  1664. upon  broadcasts.    For  example,  each  gateway on the network might
  1665. broadcast its routing tables every  30  seconds.    The  problem  with
  1666. diskless nodes is that the software to listen to these broadcasts must
  1667. be loaded over the network.  On a busy computer, programs that are not
  1668. used  for  a  few seconds will be swapped or paged out.  When they are
  1669. activated again, they must  be  swapped  or  paged  in.    Whenever  a
  1670. broadcast is sent, every computer on the network needs to activate the
  1671. routing software in order to process the broadcast.  This  means  that
  1672. many  diskless  computers will be doing swapping or paging at the same
  1673. time.  This is likely to cause a temporary overload  of  the  network.
  1674. Thus  it is very unwise for diskless machines to run any software that
  1675. requires them to listen to broadcasts.
  1676.  
  1677.  
  1678.  
  1679. 5.4.2 Proxy ARP
  1680.  
  1681.  
  1682. Proxy ARP is an alternative technique for letting  gateways  make  all
  1683. the routing decisions.  It is applicable to any broadcast network that
  1684. uses ARP or a similar technique for mapping  Internet  addresses  into
  1685. network-specific   addresses   such   as  Ethernet  addresses.    This
  1686. presentation will  assume  Ethernet.    Other  network  types  can  be
  1687. acccomodated  if  you  replace "Ethernet address" with the appropriate
  1688. network-specific address, and ARP with the protocol used  for  address
  1689. mapping by that network type.
  1690.  
  1691. In  many  ways  proxy  ARP  it is similar to using a default route and
  1692. redirects, however it uses a different mechanism to communicate routes
  1693. to  the  host.   With redirects, a full routing table is used.  At any
  1694. given moment, the host knows what gateways it is routing datagrams to.
  1695. With  proxy  ARP,  you  dispense  with explicit routing tables, and do
  1696. everything at the level of Ethernet addresses.  Proxy ARP can be  used
  1697. for all destinations, only for destinations within your network, or in
  1698. various combinations.  It will be simplest to explain it as  used  for
  1699. all  addresses.    To  do  this, you instruct the host to pretend that
  1700. every computer in  the  world  is  attached  directly  to  your  local
  1701.                                   27
  1702.  
  1703.  
  1704.  
  1705. Ethernet.  On Unix, this would be done using a command
  1706.  
  1707.       route add default 128.6.4.2 0
  1708.  
  1709. where  128.6.4.2  is  assumed  to  be the IP address of your host.  As
  1710. explained above, the metric of 0 causes everything that  matches  this
  1711. route  to be sent directly on the local Ethernet.  Alternatively, some
  1712. systems will allow you to get the same effect by setting a subnet mask
  1713. of  0.   If you do this, you may have to take precautions to make sure
  1714. that it isn't reset by an ICMP subnet mask broadcast by a system  that
  1715. knows the real subnet mask.
  1716.  
  1717. When  a  datagram  is to be sent to a local Ethernet destination, your
  1718. computer needs to know the Ethernet address of the  destination.    In
  1719. order  to find that, it uses something generally called the ARP table.
  1720. This is simply a mapping from Internet address  to  Ethernet  address.
  1721. Here's a typical ARP table.  (On our system, it is displayed using the
  1722. command "arp -a".)
  1723.  
  1724.     FOKKER.RUTGERS.EDU (128.6.5.16) at 8:0:20:0:8:22 temporary
  1725.     CROSBY.RUTGERS.EDU (128.6.5.48) at 2:60:8c:49:50:63 temporary
  1726.     CAIP.RUTGERS.EDU (128.6.4.16) at 8:0:8b:0:1:6f temporary
  1727.     DUDE.RUTGERS.EDU (128.6.20.16) at 2:7:1:0:eb:cd temporary
  1728.     W20NS.MIT.EDU (18.70.0.160) at 2:7:1:0:eb:cd temporary
  1729.     OBERON.USC.EDU (128.125.1.1) at 2:7:1:2:18:ee temporary
  1730.     gatech.edu (128.61.1.1) at 2:7:1:0:eb:cd temporary
  1731.     DARTAGNAN.RUTGERS.EDU (128.6.5.65) at 8:0:20:0:15:a9 temporary
  1732.  
  1733. Note that it is simply a list of IP addresses  and  the  corresponding
  1734. Ethernet  address.  The "temporary" indicates that the entry was added
  1735. dynamically using ARP, rather than being put into the table manually.
  1736.  
  1737. If there is an entry for the address in the ARP table, the datagram is
  1738. simply  put  on  the Ethernet with the corresponding Ethernet address.
  1739. If not, an "ARP request" is broadcast, asking for the destination host
  1740. to  identify  itself.   This request is in effect a question "will the
  1741. host with Internet  address  128.6.4.194  please  tell  me  what  your
  1742. Ethernet address is?".  When a response comes back, it is added to the
  1743. ARP table, and future datagrams  for  that  destination  can  be  sent
  1744. without delay.
  1745.  
  1746. This  mechanism  was  originally  designed  only  for  use  with hosts
  1747. attached directly to a single Ethernet.  If you need to talk to a host
  1748. on  a different Ethernet, it was assumed that your routing table would
  1749. direct you to a gateway.    The  gateway  would  of  course  have  one
  1750. interface  on  your Ethernet.  Your computer would then end up looking
  1751. up the address of that gateway using  ARP.    It  would  generally  be
  1752. useless  to  expect  ARP to work directly with a computer on a distant
  1753. network.  Since it isn't on the same  Ethernet,  there's  no  Ethernet
  1754. address you can use to send datagrams to it.  And when you send an ARP
  1755. request for it, there's nobody to answer the request.
  1756.  
  1757. Proxy ARP is based on the  concept  that  the  gateways  will  act  as
  1758. proxies  for  distant  hosts.    Suppose  you  have  a host on network
  1759. 128.6.5, with address 128.6.5.2.  (computer A  in  diagram  below)  It
  1760.                                   28
  1761.  
  1762.  
  1763.  
  1764. wants  to send a datagram to host 128.6.4.194, which is on a different
  1765. Ethernet (subnet 128.6.4). (computer C in diagram below)  There  is  a
  1766. gateway  connecting  the  two subnets, with address 128.6.5.1 (gateway
  1767. R):
  1768.  
  1769.               network 1               network 2
  1770.                128.6.5                 128.6.4
  1771.         ============================  ==================
  1772.           |              |        |    |      |    |
  1773.        ___|______   _____|____  __|____|__  __|____|____
  1774.        128.6.5.2    128.6.5.3   128.6.5.1   128.6.4.194
  1775.                                 128.6.4.1
  1776.        __________   __________  __________  ____________
  1777.        computer A   computer B   gateway R   computer C
  1778.  
  1779.  
  1780. Now suppose computer A sends an ARP request for computer  C.  C  isn't
  1781. able  to  answer  for  itself.  It's on a different network, and never
  1782. even sees the ARP request.  However gateway R can act on  its  behalf.
  1783. In  effect,  your  computer  asks "will the host with Internet address
  1784. 128.6.4.194 please tell me what your Ethernet address  is?",  and  the
  1785. gateway   says  "here  I  am,  128.6.4.194  is  2:7:1:0:eb:cd",  where
  1786. 2:7:1:0:eb:cd is actually the Ethernet address of the gateway.    This
  1787. bit  of  illusion  works  just  fine.    Your  host  now  thinks  that
  1788. 128.6.4.194  is  attached  to  the   local   Ethernet   with   address
  1789. 2:7:1:0:eb:cd.    Of  course it isn't.  But it works anyway.  Whenever
  1790. there's a datagram to be sent to 128.6.4.194, your host  sends  it  to
  1791. the specified Ethernet address.  Since that's the address of a gateway
  1792. R, the gateway gets  the  datagram.    It  then  forwards  it  to  the
  1793. destination.
  1794.  
  1795. Note that the net effect is exactly the same as having an entry in the
  1796. routing table saying  to  route  destination  128.6.4.194  to  gateway
  1797. 128.6.5.1:
  1798.  
  1799.     128.6.4.194          128.6.5.1           UGH          pe0
  1800.  
  1801. except  that  instead  of  having the routing done at the level of the
  1802. routing table, it is done at the level of the ARP table.
  1803.  
  1804. Generally it's better to use the routing  table.    That's  what  it's
  1805. there for.  However here are some cases where proxy ARP makes sense:
  1806.  
  1807.    - when you have a host that does not implement subnets
  1808.  
  1809.    - when you have a host that does not respond properly to redirects
  1810.  
  1811.    - when you do not want to have to choose a specific default gateway
  1812.  
  1813.    - when your software is unable to recover from a failed route
  1814.  
  1815. The  technique  was first designed to handle hosts that do not support
  1816. subnets.  Suppose that you have a subnetted network.  For example, you
  1817. have  chosen  to break network 128.6 into subnets, so that 128.6.4 and
  1818. 128.6.5 are separate.  Suppose you  have  a  computer  that  does  not
  1819.                                   29
  1820.  
  1821.  
  1822.  
  1823. understand  subnets.    It  will  assume that all of 128.6 is a single
  1824. network.  Thus it will be difficult to establish routing table entries
  1825. to  handle  the  configuration  above.    You  can't tell it about the
  1826. gateway explicitly using "route add 128.6.4.0 128.6.5.1  1"  Since  it
  1827. thinks  all of 128.6 is a single network, it can't understand that you
  1828. are trying to tell it where to send  one  subnet.    It  will  instead
  1829. interpret  this command as an attempt to set up a host route to a host
  1830. whose address is 128.6.4.0.  The only thing that would work  would  be
  1831. to  establish  explicit host routes for every individual host on every
  1832. other subnet.  You can't depend upon default gateways and redirects in
  1833. this  situation either.  Suppose you said "route add default 128.6.5.1
  1834. 1".  This would establish the gateway 128.6.5.1 as a default.  However
  1835. the  system  wouldn't  use  it  to  send  datagrams  to other subnets.
  1836. Suppose the host is  128.6.5.2,  and  wants  to  send  a  datagram  to
  1837. 128.6.4.194.    Since  the destination is part of 128.6, your computer
  1838. considers it to be on the same network as itself, and  doesn't  bother
  1839. to look for a gateway.
  1840.  
  1841. Proxy  ARP  solves  this  problem by making the world look the way the
  1842. defective implementation expects it to look.  Since  the  host  thinks
  1843. all  other  subnets  are part of its own network, it will simply issue
  1844. ARP requests for them.  It expects to get  back  an  Ethernet  address
  1845. that  can  be used to establish direct communications.  If the gateway
  1846. is practicing proxy ARP, it will respond with the  gateway's  Ethernet
  1847. address.    Thus  datagrams  are  sent  to the gateway, and everything
  1848. works.
  1849.  
  1850. As you can see, no specific configuration is needed to use  proxy  ARP
  1851. with a host that doesn't understand subnets.  All you need is for your
  1852. gateways to implement proxy ARP.    In  order  to  use  it  for  other
  1853. purposes, you must explicitly set up the routing table to cause ARP to
  1854. be used.  By default, TCP/IP implementations will  expect  to  find  a
  1855. gateway  for any destination that is on a different network.  In order
  1856. to make them issue ARP's, you must explicitly  install  a  route  with
  1857. metric  0,  as  in the example "route add default 128.6.5.2 0", or you
  1858. must set a subnet mask of 0.
  1859.  
  1860. It is obvious that proxy ARP is reasonable  in  situations  where  you
  1861. have hosts that don't understand subnets.  Some comments may be needed
  1862. on the other situations.  Generally TCP/IP implementations  do  handle
  1863. ICMP  redirects  properly.   Thus it is normally practical to set up a
  1864. default route to some gateway, and depend upon the  gateway  to  issue
  1865. redirects  for  destinations  that  should  use  a  different gateway.
  1866. However in case you ever run into an implementation that does not obey
  1867. redirects,  or cannot be configured to have a default gateway, you may
  1868. be able to make things work by depending upon proxy ARP.    Of  course
  1869. this  requires  that  you be able to configure the host to issue ARP's
  1870. for all destinations.    You  will  need  to  read  the  documentation
  1871. carefully  to  see  exactly  what routing features your implementation
  1872. has.
  1873.  
  1874. Sometimes you may choose to depend upon  proxy  ARP  for  convenience.
  1875. The  problem  with  routing tables is that you have to configure them.
  1876. The simplest configuration is simply to establish a default route, but
  1877. even  there  you  have  to  supply some equivalent to the Unix command
  1878.                                   30
  1879.  
  1880.  
  1881.  
  1882. "route add default ...".  Should you  change  the  addresses  of  your
  1883. gateways,  you  have  to  modify this command on all of your hosts, so
  1884. that they point to the new default gateway.  If you set up  a  default
  1885. route  that depends upon proxy ARP (i.e. has metric 0), you won't have
  1886. to change your configuration files when gateways change.   With  proxy
  1887. ARP,  no  gateway  addresses  are  given  explicitly.  Any gateway can
  1888. respond to the ARP request, no matter what its address.
  1889.  
  1890. In order to save you from having  to  do  configuration,  some  TCP/IP
  1891. implementations  default  to  using ARP when they have no other route.
  1892. The most flexible implementations allow you to mix strategies.    That
  1893. is,  if  you  have  specified  a  route for a particular network, or a
  1894. default route, they will use that route.  But if there is no route for
  1895. a  destination, they will treat it as local, and issue an ARP request.
  1896. As long as your gateways support proxy ARP, this allows such hosts  to
  1897. reach any destination without any need for routing tables.
  1898.  
  1899. Finally,  you  may  choose to use proxy ARP because it provides better
  1900. recovery from failure.  This choice is very much dependent  upon  your
  1901. implementation.    The next section will discuss the tradeoffs in more
  1902. detail.
  1903.  
  1904. In situations where  there  are  several  gateways  attached  to  your
  1905. network,  you  may  wonder how proxy ARP allows you to choose the best
  1906. one.  As described above,  your  computer  simply  sends  a  broadcast
  1907. asking  for  the  Ethernet address for a destination.  We assumed that
  1908. the gateways would be set up to respond to this broadcast.   If  there
  1909. is  more  than  one  gateway,  this  requires coordination among them.
  1910. Ideally, the gateways will have a  complete  picture  of  the  network
  1911. topology.    Thus  they are able to determine the best route from your
  1912. host to any destination.  If the gateways coordinate among themselves,
  1913. it  should  be  possible  for  the best gateway to respond to your ARP
  1914. request.  In practice, it may not  always  be  possible  for  this  to
  1915. happen.    It  is fairly easy to design algorithms to prevent very bad
  1916. routes.  For example, consider the following situation:
  1917.  
  1918.           1             2            3
  1919.         -------  A  ----------  B ----------
  1920.  
  1921. 1, 2, and 3 are networks.  A and B are gateways, connecting network  2
  1922. to  1 or 3.  If a host on network 2 wants to talk to a host on network
  1923. 1, it is fairly easy for gateway  A  to  decide  to  answer,  and  for
  1924. gateway  B  to  decide  not  to.   Here's how: if gateway B accepted a
  1925. datagram for network 1, it would have to forward it to gateway  A  for
  1926. delivery.   This would mean that it would take a datagram from network
  1927. 2 and send it right back out on network 2.  It is very  easy  to  test
  1928. for  routes  that involve this sort of circularity.  It is much harder
  1929. to deal with a situation such as the following:
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.                                   31
  1938.  
  1939.  
  1940.  
  1941.                          1
  1942.                   ---------------
  1943.                     A        B
  1944.                     |        | 4
  1945.                     |        |
  1946.                   3 |        C
  1947.                     |        |
  1948.                     |        | 5
  1949.                     D        E
  1950.                   ---------------
  1951.                          2
  1952.  
  1953. Suppose a computer on network 1 wants to send a  datagram  to  one  on
  1954. network  2.  The route via A and D is probably better, because it goes
  1955. through only one intermediate network (3).  It is also possible to  go
  1956. via  B,  C,  and  E,  but  that path is probably slightly slower.  Now
  1957. suppose the  computer  on  network  1  sends  an  ARP  request  for  a
  1958. destination on 2.  It is likely that A and B will both respond to that
  1959. request.  B is not quite as good a route as A. However it  is  not  so
  1960. bad  as  the case above.  B won't have to send the datagram right back
  1961. out onto network 1.  It is unable  to  determine  there  is  a  better
  1962. alternative  route  without  doing  a  significant  amount  of  global
  1963. analysis on the network.  This may not be practical in the  amount  of
  1964. time available to process an ARP request.
  1965.  
  1966.  
  1967.  
  1968. 5.4.3 Moving to New Routes After Failures
  1969.  
  1970.  
  1971. In  principle,  IP  routing  is  capable of handling line failures and
  1972. gateway crashes.  There  are  various  mechanisms  to  adjust  routing
  1973. tables  and  ARP  tables to keep them up to date.  Unfortunately, many
  1974. major implementations of TCP/IP have  not  implemented  all  of  these
  1975. mechanisms.   The net result is that you have to look carefully at the
  1976. documentation for your implementation,  and  consider  what  kinds  of
  1977. failures  are  most  likely.   You then have to choose a strategy that
  1978. will work best for your site.  The basic choices  for  finding  routes
  1979. have all been listed above:  spying on the gateways' routing protocol,
  1980. setting up a default route and depending  upon  redirects,  and  using
  1981. proxy  ARP.    These methods all have their own limitations in dealing
  1982. with a changing network.
  1983.  
  1984. Spying on the gateways' routing protocol is theoretically the cleanest
  1985. solution.  Assuming that the gateways use good routing technology, the
  1986. tables that they broadcast  contain  enough  information  to  maintain
  1987. optimal  routes  to all destinations.  Should something in the network
  1988. change (a line or a gateway  goes  down),  this  information  will  be
  1989. reflected  in  the  tables,  and  the routing software will be able to
  1990. update the hosts' routing tables appropriately.  The disadvantages are
  1991. entirely practical.  However in some situations the robustness of this
  1992. approach may outweight the disadvantages.  To summarize the discussion
  1993. above, the disadvantages are:
  1994.  
  1995.    - If  the  gateways  are  using  sophisticated  routing  protocols,
  1996.                                   32
  1997.  
  1998.  
  1999.  
  2000.      configuration may be fairly complex.  Thus you will be faced with
  2001.      setting up and maintaining configuration files on every host.
  2002.  
  2003.    - Some  gateways  use proprietary routing protocols.  In this case,
  2004.      you may not  be  able  to  find  software  for  your  hosts  that
  2005.      understands them.
  2006.  
  2007.    - If your hosts are diskless, there can be very serious performance
  2008.      problems associated with listening to routing broadcasts.
  2009.  
  2010. Some gateways may be able  to  convert  from  their  internal  routing
  2011. protocol  to  a simpler one for use by your hosts.  This could largely
  2012. bypass the first two disadvantages.  Currently there is no  known  way
  2013. to get around the third one.
  2014.  
  2015. The  problems  with  default  routes/redirects  and with proxy ARP are
  2016. similar: they both have trouble dealing with  situations  where  their
  2017. table  entries  no  longer  apply.    The only real difference is that
  2018. different tables are involved.  Suppose a gateway goes down.   If  any
  2019. of  your current routes are using that gateway, you may be in trouble.
  2020. If you are depending upon the routing table, the major  mechanism  for
  2021. adjusting  routes is the redirect.  This works fine in two situations:
  2022.  
  2023.    - where the default gateway is not the best  route.    The  default
  2024.      gateway can direct you to a better gateway
  2025.  
  2026.    - where  a distant line or gateway fails.  If this changes the best
  2027.      route, the current gateway can redirect you to the  gateway  that
  2028.      is now best
  2029.  
  2030. The case it does not protect you against is where the gateway that you
  2031. are currently sending your datagrams to crashes.  Since it is down, it
  2032. is  unable to redirect you to another gateway.  In many cases, you are
  2033. also unprotected if your default  gateway  goes  down,  since  routing
  2034. starts by sending to the default gateway.
  2035.  
  2036. The  situation  with proxy ARP is similar.  If the gateways coordinate
  2037. themselves properly,  the  right  one  will  respond  initially.    If
  2038. something  elsewhere  in  the  network  changes,  the  gateway you are
  2039. currently issuing can issue a  redirect  to  a  new  gateway  that  is
  2040. better.    (It is usually possible to use redirects to override routes
  2041. established by proxy ARP.)  Again, the  case  you  are  not  protected
  2042. against  is  where the gateway you are currently using crashes.  There
  2043. is no equivalent to failure of a default gateway,  since  any  gateway
  2044. can respond to the ARP request.
  2045.  
  2046. So  the big problem is that failure of a gateway you are using is hard
  2047. to recover from.  It's hard because the main  mechanism  for  changing
  2048. routes  is  the  redirect,  and  a  gateway  that  is down can't issue
  2049. redirects.  Ideally, this problem should be  handled  by  your  TCP/IP
  2050. implementation,   using   timeouts.    If  a  computer  stops  getting
  2051. responses, it should cancel the existing route, and try to establish a
  2052. new  one.    Where  you are using a default route, this means that the
  2053. TCP/IP implementation must be able to declare a route as down based on
  2054. a  timeout.  If you have been redirected to a non-default gateway, and
  2055.                                   33
  2056.  
  2057.  
  2058.  
  2059. that route is declared down, traffic will return to the default.   The
  2060. default gateway can then begin handling the traffic, or redirect it to
  2061. a different gateway.  To handle  failure  of  a  default  gateway,  it
  2062. should  be possible to have more than one default.  If one is declared
  2063. down, another will be used.  Together, these  mechanisms  should  take
  2064. care of any failure.
  2065.  
  2066. Similar  mechanisms can be used by systems that depend upon proxy ARP.
  2067. If a connection is timing out, the ARP table entry that it uses should
  2068. be  cleared.   This will cause a new ARP request, which can be handled
  2069. by a gateway that is still up.  A simpler mechanism would simply be to
  2070. time  out  all  ARP entries after some period.  Since making a new ARP
  2071. request has a very low overhead, there's no problem with  removing  an
  2072. ARP entry even if it is still good.  The next time a datagram is to be
  2073. sent, a new request will be made.    The  response  is  normally  fast
  2074. enough that users will not even notice the delay.
  2075.  
  2076. Unfortunately,   many   common   implementations   do  not  use  these
  2077. strategies.  In Berkeley 4.2, there is no automatic way of getting rid
  2078. of  any  kind of entry, either routing or ARP.  They do not invalidate
  2079. routes or ARP entries based on failures.  If  gateway  crashes  are  a
  2080. significant  problem,  there may be no choice but to run software that
  2081. listens to the routing protocol.  In Berkeley 4.3, routing entries are
  2082. removed  when  TCP connections are failing.  ARP entries are still not
  2083. removed.  This makes the default route strategy  more  attractive  for
  2084. 4.3 than proxy ARP.  Having more than one default route may also allow
  2085. for recovery from failure of a default gateway.  Note however that 4.3
  2086. only  handles  timeout for connections using TCP.  If a route is being
  2087. used only by services based on UDP, it will not recover  from  gateway
  2088. failure.    While  the  "traditional" TCP/IP services use TCP, network
  2089. file systems generally do not.  Thus 4.3-based systems still  may  not
  2090. always be able to recover from failure.
  2091.  
  2092. In  general,  you  should  examine  your  implementation  in detail to
  2093. determine what sort of error recovery strategy it uses.  We hope  that
  2094. the  discussion in this section will then help you choose the best way
  2095. of dealing with routing.
  2096.  
  2097. There is one more strategy that some older implementations use.  It is
  2098. strongly  discouraged,  but we mention it here so you can recognize it
  2099. if you see it.  Some implementations detect gateway failure by  taking
  2100. active  measure to see what gateways are up.  The best version of this
  2101. is based on a list of all gateways that are currently in use.    (This
  2102. can  be  determined  from  the routing table.)  Every minute or so, an
  2103. echo request datagram is sent to each such  gateway.    If  a  gateway
  2104. stops responding to echo requests, it is declared down, and all routes
  2105. using it revert to the default.   With  such  an  implementation,  you
  2106. normally supply more than one default gateway.  If the current default
  2107. stops responding, an alternate is chosen.  In some cases,  it  is  not
  2108. even  necessary  to  choose an explicit default gateway.  The software
  2109. will  randomly  choose  any  gateway  that  is   responding.      This
  2110. implementation  is  very  flexible  and  recovers  well from failures.
  2111. However a large network full of such implementations will waste a  lot
  2112. of  bandwidth  on  the  echo  datagrams  that are used to test whether
  2113. gateways  are  up.    This  is  the  reason  that  this  strategy   is
  2114.                                   34
  2115.  
  2116.  
  2117.  
  2118. discouraged.
  2119.  
  2120.  
  2121.  
  2122. 6. Bridges and Gateways
  2123.  
  2124.  
  2125. This  section  will  deal  in  more detail with the technology used to
  2126. construct larger networks.  It  will  focus  particularly  on  how  to
  2127. connect  together  multiple  Ethernets,  token rings, etc.  These days
  2128. most networks are hierarchical.  Individual hosts attach to local-area
  2129. networks  such  as  Ethernet or token ring.  Then those local networks
  2130. are connected via some combination of backbone networks and  point  to
  2131. point  links.    A  university might have a network that looks in part
  2132. like this:
  2133.  
  2134.      ________________________________
  2135.      |   net 1      net 2    net 3  |        net 4            net 5
  2136.      | ---------X---------X-------- |      --------         --------
  2137.      |                         |    |         |                 |
  2138.      |  Building A             |    |         |                 |
  2139.      |               ----------X--------------X-----------------X
  2140.      |                              |  campus backbone network  :
  2141.      |______________________________|                           :
  2142.                                                          serial :
  2143.                                                            line :
  2144.                                                          -------X-----
  2145.                                                              net  6
  2146.  
  2147. Nets 1, 2 and 3 are in one building.  Nets 4 and 5  are  in  different
  2148. buildings  on  the  same  campus.  Net 6 is in a somewhat more distant
  2149. location.  The diagram above shows nets 1, 2, and  3  being  connected
  2150. directly,  with switches that handle the connections being labelled as
  2151. "X".  Building A is connected to  the  other  buildings  on  the  same
  2152. campus  by  a backbone network.  Note that traffic from net 1 to net 5
  2153. takes the following path:
  2154.  
  2155.    - from 1 to 2 via the direct connection between those networks
  2156.  
  2157.    - from 2 to 3 via another direct connection
  2158.  
  2159.    - from 3 to the backbone network
  2160.  
  2161.    - across the backbone network from building A to  the  building  in
  2162.      which net 5 is housed
  2163.  
  2164.    - from the backbone network to net 5
  2165.  
  2166. Traffic  for  net  6 would additionally pass over a serial line.  With
  2167. the setup as shown, the same switch  is  being  used  to  connect  the
  2168. backbone  network  to net 5 and to the serial line.  Thus traffic from
  2169. net 5 to net 6 would not need to go through the backbone, since  there
  2170. is a direct connection from net 5 to the serial line.
  2171.  
  2172. This section is largely about what goes in those "X"'s.
  2173.                                   35
  2174.  
  2175.  
  2176.  
  2177. 6.1 Alternative Designs
  2178.  
  2179.  
  2180. Note  that  there  are alternatives to the sort of design shown above.
  2181. One is to use point to point lines or switched lines directly to  each
  2182. host.   Another is to use a single-level of network technology that is
  2183. capable of handling both local and long-haul networking.
  2184.  
  2185.  
  2186.  
  2187. 6.1.1 A mesh of point to point lines
  2188.  
  2189.  
  2190. Rather than connecting hosts to a local network such as Ethernet,  and
  2191. then   interconnecting  the  Ethernets,  it  is  possible  to  connect
  2192. long-haul serial lines directly to the individual computers.  If  your
  2193. network   consists   primarily  of  individual  computers  at  distant
  2194. locations, this might make sense.  Here would be  a  small  design  of
  2195. that type.
  2196.  
  2197.           computer 1                computer 2             computer 3
  2198.               |                         |                      |
  2199.               |                         |                      |
  2200.               |                         |                      |
  2201.           computer 4 -------------- computer 5 ----------- computer 6
  2202.  
  2203. In  the design shown earlier, the task of routing datagrams around the
  2204. network is handled by special-purpose switching units shown as  "X"'s.
  2205. If  you  run lines directly between pairs of hosts, your hosts will be
  2206. doing this sort of routing and switching,  as  well  as  their  normal
  2207. computing.    Unless  you  run  lines  directly  between every pair of
  2208. computers, some systems will end up handling traffic for  others.  For
  2209. example,  in this design, traffic from 1 to 3 will go through 4, 5 and
  2210. 6.  This is certainly possible, since most TCP/IP implementations  are
  2211. capable of forwarding datagrams.  If your network is of this type, you
  2212. should think of your hosts as also acting as gateways.   Much  of  the
  2213. discussion  below  on  configuring  gateways will apply to the routing
  2214. software that you run on your hosts.  This sort  of  configuration  is
  2215. not as common as it used to be, for two reasons:
  2216.  
  2217.    - Most large networks have more than one computer per location.  In
  2218.      this case it is less expensive to set up a local network at  each
  2219.      location than to run point to point lines to each computer.
  2220.  
  2221.    - Special-purpose  switching  units have become less expensive.  It
  2222.      often makes sense to offload the routing and communications tasks
  2223.      to a switch rather than handling it on the hosts.
  2224.  
  2225. It is of course possible to have a network that mixes the two kinds of
  2226. techology.  In this case,  locations  with  more  equipment  would  be
  2227. handled  by  a hierarchical system, with local-area networks connected
  2228. by switches.  Remote locations with a single computer would be handled
  2229. by  point  to  point lines going directly to those computers.  In this
  2230. case the routing software used on the remote computers would  have  to
  2231. be  compatible  with that used by the switches, or there would need to
  2232.                                   36
  2233.  
  2234.  
  2235.  
  2236. be a gateway between the two parts of the network.
  2237.  
  2238. Design decisions of this type are typically made after  an  assessment
  2239. of  the  level  of network traffic, the complexity of the network, the
  2240. quality of routing software available for the hosts, and  the  ability
  2241. of the hosts to handle extra network traffic.
  2242.  
  2243.  
  2244.  
  2245. 6.1.2 Circuit switching technology
  2246.  
  2247.  
  2248. Another  alternative  to  the hierarchical LAN/backbone approach is to
  2249. use circuit switches connected to each individual computer.   This  is
  2250. really  a  variant  of  the  point  to point line technique, where the
  2251. circuit switch allows each system to have what  amounts  to  a  direct
  2252. line to every other system.  This technology is not widely used within
  2253. the TCP/IP community, largely because the TCP/IP protocols assume that
  2254. the  lowest  level  handles  isolated  datagrams.    When a continuous
  2255. connection  is  needed,  higher  network  layers  implement  it  using
  2256. datagrams.    This  datagram-oriented  technology  does  not  match  a
  2257. circuit-oriented environment very closely.  In order  to  use  circuit
  2258. switching  technology,  the IP software must be modified to be able to
  2259. build and tear down virtual circuits as appropriate.  When there is  a
  2260. datagram  for a given destination, a virtual circuit must be opened to
  2261. it.  The virtual circuit would  be  closed  when  there  has  been  no
  2262. traffic  to  that  destination  for  some time.  The major use of this
  2263. technology is for  the  DDN  (Defense  Data  Network).    The  primary
  2264. interface  to  the  DDN is based on X.25.  This network appears to the
  2265. outside as a distributed X.25 network.  TCP/IP software  intended  for
  2266. use with the DDN must do precisely the virtual circuit management just
  2267. described.     Similar   techniques   could   be   used   with   other
  2268. circuit-switching  technologies, e.g. ATT's DataKit, although there is
  2269. almost no software currently available to support this.
  2270.  
  2271.  
  2272.  
  2273. 6.1.3 Single-level networks
  2274.  
  2275.  
  2276. In some cases new developments in wide-area networks can eliminate the
  2277. need  for hierarchical networks.  Early hierarchical networks were set
  2278. up because the only convenient  network  technology  was  Ethernet  or
  2279. other  LAN's, and those could not span distances large enough to cover
  2280. an entire campus.  Thus it  was  necessary  to  use  serial  lines  to
  2281. connect  LAN's  in  various  locations.    It  is now possible to find
  2282. network technology whose characteristics are similar to Ethernet,  but
  2283. where  a  single  network  can  span a campus.  Thus it is possible to
  2284. think of using a single large network, with no hierarchical structure.
  2285.  
  2286. The  primary  limitations  of  a  large   single-level   network   are
  2287. performance  and  reliability  considerations.  If a single network is
  2288. used  for  the  entire  campus,  it  is  very  easy  to  overload  it.
  2289. Hierarchical   networks  can  handle  a  larger  traffic  volume  than
  2290. single-level networks if traffic patterns have a reasonable amount  of
  2291.                                   37
  2292.  
  2293.  
  2294.  
  2295. locality.  That is, in many applications, traffic within an individual
  2296. department tends to be greater than traffic among departments.
  2297.  
  2298. Let's look at a concrete example.  Suppose there are  10  departments,
  2299. each  of  which  generates 1 Mbit/sec of traffic.  Suppose futher than
  2300. 90% of that traffic is to other systems  within  the  department,  and
  2301. only  10%  is  to  other  departments.  If each department has its own
  2302. network, that network only needs to handle 1 Mbit/sec.   The  backbone
  2303. network connecting the department also only needs 1 Mbit/sec capacity,
  2304. since it is handling 10% of 1 Mbit from each department.  In order  to
  2305. handle  this  situation  with a single wide-area network, that network
  2306. would have to be able to handle the  simultaneous  load  from  all  10
  2307. departments, which would be 10 Mbit/sec.
  2308.  
  2309. However  this example was carefully constructed to be favorable to the
  2310. hierarchical design.  If more of the  traffic  in  the  department  is
  2311. going  to  other  departments,  then  the  backbone will need a higher
  2312. bandwidth.  For example, suppose that a campus has a  few  centralized
  2313. resources,  e.g.  mainframes  and  other  large systems in a computing
  2314. center.  If  most  of  the  network  traffic  is  from  small  systems
  2315. attempting  to get to the central system, then the argument above does
  2316. not work.  In this case a hierarchy may still be useful.   However  it
  2317. doesn't  reduce  the bandwidth required for the long-haul network.  In
  2318. the example above, if all 10 departments communicated  primarily  with
  2319. systems  at the computer center, the backbone would have to be able to
  2320. carry all of their traffic, 10Mbits per second.  The  computer  center
  2321. would  either attach its systems directly to the backbone, or it would
  2322. have a "departmental" network with a capacity of  10Mbits  per  second
  2323. rather than the 1Mbits per second needed by the other departments.
  2324.  
  2325. The   second  limitation  on  single-level  networks  is  reliability,
  2326. maintainability and security.  Wide-area networks are  more  difficult
  2327. to  diagnose  and  maintain than local-area networks, because problems
  2328. can be introduced from any building to which the network is connected.
  2329. They  also  make traffic visible in all locations.  For these reasons,
  2330. it is often sensible to handle local  traffic  locally,  and  use  the
  2331. wide-area  network  only  for  traffic  that  actually must go between
  2332. buildings.  However if you have a situation where  each  location  has
  2333. only  one  or  two  computers, it may not make sense to set up a local
  2334. network at each location, and a single-level network may make sense.
  2335.  
  2336.  
  2337.  
  2338. 6.1.4 Mixed designs
  2339.  
  2340.  
  2341. In practice,  few  large  networks  have  the  luxury  of  adopting  a
  2342. theoretically pure design.
  2343.  
  2344. It is very unlikely that any large network will be able to avoid using
  2345. a hierarchical design.  Suppose we  set  out  to  use  a  single-level
  2346. network.  Even if most buildings have only one or two computers, there
  2347. will be some location where there are enough that a local-area network
  2348. is justified.  The result is a mixture of a single-level network and a
  2349. hierachical network.  Most buildings have  their  computers  connected
  2350.                                   38
  2351.  
  2352.  
  2353.  
  2354. directly  to  the  wide-area  network, as with a single-level network.
  2355. However in one building there is a local-area network which  uses  the
  2356. wide-area  network  as  a  backbone,  connecting to it via a switching
  2357. unit.
  2358.  
  2359. On the other side of the story, even network designers with  a  strong
  2360. commitment  to  hierarchical networks are likely to find some parts of
  2361. the network where it simply doesn't make economic sense to  install  a
  2362. local-area  network.    So  a  host  is put directly onto the backbone
  2363. network, or tied directly to a serial line.
  2364.  
  2365. However you should think carefully before  making  ad  hoc  departures
  2366. from  your  design  philosophy in order to save a few dollars.  In the
  2367. long run, network maintainability is going to depend upon your ability
  2368. to make sense of what is going on in the network.  The more consistent
  2369. your technology is, the more likely you are to be able to maintain the
  2370. network.
  2371.  
  2372.  
  2373.  
  2374. 6.2 An introduction to alternative switching technologies
  2375.  
  2376.  
  2377. This  section will discuss the characteristics of various technologies
  2378. used to switch datagrams between networks.  In effect, we  are  trying
  2379. to  fill  in  some  details  about the black boxes assumed in previous
  2380. sections.  There are three basic types of switches, generally referred
  2381. to as repeaters, bridges, and gateways, or alternatively as level 1, 2
  2382. and 3 switches (based on the level of the  OSI  model  at  which  they
  2383. operate).    Note however that there are systems that combine features
  2384. of more than one of these, particularly bridges and gateways.
  2385.  
  2386. The most important dimensions on which switches  vary  are  isolation,
  2387. performance, routing and network management facilities.  These will be
  2388. discussed below.
  2389.  
  2390. The most serious difference is between repeaters  and  the  other  two
  2391. types  of  switch.    Until recently, gateways provided very different
  2392. services from bridges.  However these two technologies are now  coming
  2393. closer  together.  Gateways are beginning to adopt the special-purpose
  2394. hardware that has characterized bridges in  the  past.    Bridges  are
  2395. beginning to adopt more sophisticated routing, isolation features, and
  2396. network management, which have characterized  gateways  in  the  past.
  2397. There  are  also systems that can function as both bridge and gateway.
  2398. This means that at the moment, the crucial  decision  may  not  be  to
  2399. decide  whether  to  use  a  bridge  or  a gateway, but to decide what
  2400. features you want in a switch  and  how  it  fits  into  your  overall
  2401. network design.
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.                                   39
  2410.  
  2411.  
  2412.  
  2413. 6.2.1 Repeaters
  2414.  
  2415.  
  2416. A repeater is a piece of equipment that connects two networks that use
  2417. the same technology.  It receives every data packet on  each  network,
  2418. and retransmits it onto the other network.  The net result is that the
  2419. two networks have exactly the same  set  of  packets  on  them.    For
  2420. Ethernet or IEEE 802.3 networks there are actually two different kinds
  2421. of repeater.  (Other network technologies may not need  to  make  this
  2422. distinction.)
  2423.  
  2424. A  simple  repeater  operates at a very low level indeed.  Its primary
  2425. purpose is to get around limitations in cable length caused by  signal
  2426. loss or timing dispersion.  It allows you to construct somewhat larger
  2427. networks than you would otherwise be able to construct.    It  can  be
  2428. thought  of  as  simply  a two-way amplifier.  It passes on individual
  2429. bits in the signal, without doing any processing at the packet  level.
  2430. It even passes on collisions.  That is, if a collision is generated on
  2431. one of  the  networks  connected  to  it,  the  repeater  generates  a
  2432. collision  on  the  other  network.  There is a limit to the number of
  2433. repeaters that you can use in a network.  The  basic  Ethernet  design
  2434. requires  that signals must be able to get from one end of the network
  2435. to the other within a specified amount of time.    This  determines  a
  2436. maximum  allowable length.  Putting repeaters in the path does not get
  2437. around this limit.  (Indeed each repeater adds some delay, so in  some
  2438. ways  a repeater makes things worse.)  Thus the Ethernet configuration
  2439. rules limit the number of repeaters that can be in any path.
  2440.  
  2441. A "buffered repeater" operates at the level  of  whole  data  packets.
  2442. Rather  than passing on signals a bit at a time, it receives an entire
  2443. packet from one network into an internal buffer and  then  retransmits
  2444. it  onto  the other network.  It does not pass on collisions.  Because
  2445. such low-level features  as  collisions  are  not  repeated,  the  two
  2446. networks continue to be separate as far as the Ethernet specifications
  2447. are concerned.  Thus there  are  no  restrictions  on  the  number  of
  2448. buffered  repeaters  that can be used.  Indeed there is no requirement
  2449. that both of the networks be of  the  same  type.    However  the  two
  2450. networks  must  be sufficiently similar that they have the same packet
  2451. format.  Generally this means that  buffered  repeaters  can  be  used
  2452. between two networks of the IEEE 802.x family (assuming that they have
  2453. chosen the same address  length  and  maximum  packet  size),  or  two
  2454. networks  of  some other related family.  A pair of buffered repeaters
  2455. can be used to connect two networks via a serial line.
  2456.  
  2457. Buffered repeaters share with simple repeaters the most basic feature:
  2458. they  repeat every data packet that they receive from one network onto
  2459. the other.  Thus the two networks end up with exactly the same set  of
  2460. packets on them.
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.                                   40
  2469.  
  2470.  
  2471.  
  2472. 6.2.2 Bridges and gateways
  2473.  
  2474.  
  2475. A  bridge  differs from a buffered repeater primarily in the fact that
  2476. it exercizes some selectivity as to what datagrams it forwards between
  2477. networks.    Generally  the  goal  is  to increase the capacity of the
  2478. system by keeping local traffic confined to the network  on  which  it
  2479. originates.  Only traffic intended for other networks goes through the
  2480. bridge.  So far this  description  would  also  apply  to  a  gateway.
  2481. Bridges  and  gateways differ in the way they determine what datagrams
  2482. to forward.  A bridge uses only the OSI level 2 address.  In the  case
  2483. of  Ethernet  or  IEEE  802.x networks, this is the 6-byte Ethernet or
  2484. MAC-level address. (The term  "MAC-level  address"  is  more  general.
  2485. However  for  the  sake of concreteness, examples in this section will
  2486. assume that Ethernet is being used.  You  may  generally  replace  the
  2487. term  "Ethernet  address"  with  the  equivalent MAC-level address for
  2488. other similar technologies.)  A bridge does not examine  the  datagram
  2489. itself,  so  it  does  not  use  the  IP address or its equivalent for
  2490. routing decisions.  In contrast, a gateway bases its decisions on  the
  2491. IP address, or its equivalent for other protocols.
  2492.  
  2493. There are several reasons why it matters which kind of address is used
  2494. for decisions.  The most basic is that  it  affects  the  relationship
  2495. between  the  switch  and  the  upper  layers  of  the  protocol.   If
  2496. forwarding is done at the level of the MAC-level address (bridge), the
  2497. switch  will  be  invisible to the protocols.  If it is done at the IP
  2498. level, the switch will be visible.  Let's give an example.   Here  are
  2499. two networks connected by a bridge:
  2500.  
  2501.               network 1          network 2
  2502.                128.6.5            128.6.4
  2503.         ==================  ================================
  2504.           |            |      |            |             |
  2505.        ___|______    __|______|__   _______|___   _______|___
  2506.        128.6.5.2        bridge       128.6.4.3     128.6.4.4
  2507.        __________    ____________   ___________   ___________
  2508.        computer A                   computer B    computer C
  2509.  
  2510.  
  2511. Note that the bridge does not have an IP address.  As far as computers
  2512. A, B, and C are concerned,  there  is  a  single  Ethernet  (or  other
  2513. network)  to which they are all attached.  This means that the routing
  2514. tables must be set up so that computers on both  networks  treat  both
  2515. networks  as local.  When computer A opens a connection to computer B,
  2516. it first broadcasts an ARP request asking for  computer  B's  Ethernet
  2517. address.    The  bridge  must  pass  this  broadcast from network 1 to
  2518. network 2.  (In general, bridges must pass all broadcasts.)  Once  the
  2519. two computers know each other's Ethernet addresses, communications use
  2520. the Ethernet address as the destination.  At that  point,  the  bridge
  2521. can  start  exerting  some  selectivity.   It will only pass datagrams
  2522. whose Ethernet destination address is  for  a  machine  on  the  other
  2523. network.  Thus a datagram from B to A will be passed from network 2 to
  2524. 1, but a datagram from B to C will be ignored.
  2525.  
  2526. In order to make this  selection,  the  bridge  needs  to  know  which
  2527.                                   41
  2528.  
  2529.  
  2530.  
  2531. network  each machine is on.  Most modern bridges build up a table for
  2532. each network  to  which  they  are  connected,  listing  the  Ethernet
  2533. addresses  of  machines  known to be on that network.  They do this by
  2534. watching all of the datagrams on each network.  When a datagram  first
  2535. appears  on  network 1, it is reasonable to conclude that the Ethernet
  2536. source address corresponds to a machine on network 1.
  2537.  
  2538. Note that a bridge must look at every datagram on  the  Ethernet,  for
  2539. two  different reasons.  First, it may use the source address to learn
  2540. which machines are on which network.  Second,  it  must  look  at  the
  2541. destination address in order to decide whether it needs to forward the
  2542. datagram to the other network.
  2543.  
  2544. As mentioned above, generally bridges must pass  broadcasts  from  one
  2545. network to the other.  Broadcasts are often used to locate a resource.
  2546. The ARP request is a typical example of this.  Since the bridge has no
  2547. way  of  knowing  what  host is going to answer the broadcast, it must
  2548. pass it on to the other network.  Some  bridges  have  user-selectable
  2549. filters.  With them, it is possible to block some broadcasts and allow
  2550. others.  You might allow ARP broadcasts (which are essential for IP to
  2551. function),  but confine less essential broadcasts to one network.  For
  2552. example, you might choose not to pass  rwhod  broadcasts,  which  some
  2553. systems  use  to  keep  track  of  every  user logged into every other
  2554. system.  You might decide that it is  sufficient  for  rwhod  to  know
  2555. about the systems on a single segment of the network.
  2556.  
  2557. Now let's take a look at two networks connected by a gateway
  2558.  
  2559.               network 1                   network 2
  2560.                128.6.5                     128.6.4
  2561.         ====================      ==================================
  2562.           |              |          |              |             |
  2563.        ___|______    ____|__________|____   _______|___   _______|___
  2564.        128.6.5.2     128.6.5.1  128.6.4.1    128.6.4.3     128.6.4.4
  2565.        __________    ____________________   ___________   ___________
  2566.        computer A           gateway           computer B    computer C
  2567.  
  2568.  
  2569. Note  that  the  gateway  has IP addresses assigned to each interface.
  2570. The  computers'  routing  tables  are  set  up  to   forward   through
  2571. appropriate  address.    For  example,  computer A has a routing entry
  2572. saying that it should use the  gateway  128.6.5.1  to  get  to  subnet
  2573. 128.6.4.
  2574.  
  2575. Because  the  computers  know  about the gateway, the gateway does not
  2576. need to scan all the packets on the Ethernet.  The computers will send
  2577. datagrams  to  it  when  appropriate.  For example, suppose computer A
  2578. needs to send a message to computer B. Its routing table will tell  it
  2579. to  use  gateway  128.6.5.1.    It  will issue an ARP request for that
  2580. address.  The gateway will respond to the ARP  request,  just  as  any
  2581. host  would.  From then on, datagrams destined for B will be sent with
  2582. the gateway's Ethernet address.
  2583.  
  2584.  
  2585.  
  2586.                                   42
  2587.  
  2588.  
  2589.  
  2590. 6.2.3 More about bridges
  2591.  
  2592.  
  2593. There are several advantages to using  the  MAC-level  address,  as  a
  2594. bridge  does.   First, every packet on an Ethernet or IEEE network has
  2595. such an address.  The address is in the same place for  every  packet,
  2596. whether  it  is  IP,  DECnet,  or  some  other  protocol.   Thus it is
  2597. relatively fast to get the address from the packet.   A  gateway  must
  2598. decode  the  entire IP header, and if it is to support protocols other
  2599. than IP, it must have software for each such  protocol.    This  means
  2600. that  a bridge automatically supports every possible protocol, whereas
  2601. a gateway requires specific provisions for  each  protocol  it  is  to
  2602. support.
  2603.  
  2604. However  there  are  also disadvantages.  The one that is intrinsic to
  2605. the design of a bridge is
  2606.  
  2607.    - A bridge must look at every packet on the network, not just those
  2608.      addressed  to  it.    Thus it is possible to overload a bridge by
  2609.      putting it on a very busy network, even if very little traffic is
  2610.      actually going through the bridge.
  2611.  
  2612. However there is another disadvantage that is based on the way bridges
  2613. are usually built.  It is possible in principle to design bridges that
  2614. do not have this disadvantage, but I don't know of any plans to do so.
  2615. It stems from the fact that bridges do not  have  a  complete  routing
  2616. table  that describes the entire system of networks.  They simply have
  2617. a list of the Ethernet addresses that lie on  each  of  its  networks.
  2618. This means
  2619.  
  2620.    - Networks  that  use  bridges cannot have loops in them.  If there
  2621.      were a loop,  some  bridges  would  see  traffic  from  the  same
  2622.      Ethernet address coming from both directions, and would be unable
  2623.      to decide which table to put that address  in.    Note  that  any
  2624.      parallel  paths  to the same destination constitute a loop.  This
  2625.      means  that  multiple  paths  cannot  be  used  for  purposes  of
  2626.      splitting the load or providing redundancy.
  2627.  
  2628. There  are  some  ways  of  getting around the problem of loops.  Many
  2629. bridges allow configurations with redundant connections, but turn  off
  2630. links  until  there are no loops left.  Should a link fail, one of the
  2631. disabled ones is then brought back into service.  Thus redundant links
  2632. can  still  buy  you  extra  reliability.    But they can't be used to
  2633. provide extra capacity.  It is also possible to build  a  bridge  that
  2634. will  make  use  of  parallel point to point lines, in the one special
  2635. case where those lines go between a  single  pair  of  bridges.    The
  2636. bridges  would  treat  the two lines as a single virtual line, and use
  2637. them alternately in round-robin fashion.
  2638.  
  2639. The process of disabling redundant  connections  until  there  are  no
  2640. loops  left  is  called  a "spanning tree algorithm".  This name comes
  2641. from the fact that a tree is defined as a pattern of connections  with
  2642. no loops.  Thus one wants to disable connections until the connections
  2643. that are left form a tree that "spans" (includes) all of the  networks
  2644. in  the  system.  In order to do this, all of the bridges in a network
  2645.                                   43
  2646.  
  2647.  
  2648.  
  2649. system must communicate among themselves.  There is an  IEEE  proposal
  2650. to  standardize  the protocol for doing this, and for constructing the
  2651. spanning tree.
  2652.  
  2653. Note that there is a tendency  for  the  resulting  spanning  tree  to
  2654. result  in  high  network  loads  on certain parts of the system.  The
  2655. networks near the "top of the tree" handle all traffic between distant
  2656. parts  of  the  network.  In a network that uses gateways, it would be
  2657. possible to put in an extra link between parts  of  the  network  that
  2658. have  heavy  traffic between them.  However such extra links cannot be
  2659. used by a set of bridges.
  2660.  
  2661.  
  2662.  
  2663. 6.2.4 More about gateways
  2664.  
  2665.  
  2666. Gateways have their own advantages and disadvantages.   In  general  a
  2667. gateway  is more complex to design and to administer than a bridge.  A
  2668. gateway must participate in all of the protocols that it  is  designed
  2669. to  forward.  For example, an IP gateway must respond to ARP requests.
  2670. The IP standards also require it to completely process the IP  header,
  2671. decrementing the time to live field and obeying any IP options.
  2672.  
  2673. Gateways  are  designed to handle more complex network topologies than
  2674. bridges.  As such, they have a different (and  more  complex)  set  of
  2675. decisions  to make.  In general a bridge has fairly simple decision to
  2676. make: should it forward a datagram, and if so which  interface  should
  2677. it send the datagram out?  When a gateway forwards a datagram, it must
  2678. decide what host or gateway to send the datagram  to  next.    If  the
  2679. gateway  sends  a datagram back onto the same network it came from, it
  2680. should also issue a redirect to the source of the datagram telling  it
  2681. to  use a better route.  Many gateways can also handle parallel paths.
  2682. If there are several equally good paths to a destination, the  gateway
  2683. will  alternate  among  them in round-robin fashion.  (This is done by
  2684. some bridges also, though it is less common there.    In  both  cases,
  2685. there  are some issues raised by round-robin alternation.  It tends to
  2686. lead to datagrams arriving in an order different  than  the  order  in
  2687. which  they  were  sent.    This  can  complicate  processing  by  the
  2688. destination host.  Some older  TCP/IP  implementations  have  bugs  in
  2689. handling out of order datagrams.)
  2690.  
  2691. In  order  to  handle these decisions, a gateway will typically have a
  2692. routing table that looks very much  like  a  host's.    As  with  host
  2693. routing  tables, a gateway's table contains an entry for each possible
  2694. network number.  For each network, there is  either  an  entry  saying
  2695. that that network is connected directly to the gateway, or there is an
  2696. entry saying that traffic for that network should be forwarded through
  2697. some  other  gateway  or  gateways.    We  will  describe the "routing
  2698. protocols" used to build up this information later, in the  discussion
  2699. on how to configure a gateway.
  2700.  
  2701.  
  2702.  
  2703.  
  2704.                                   44
  2705.  
  2706.  
  2707.  
  2708. 6.3 Comparing the switching technologies
  2709.  
  2710.  
  2711. Repeaters,  buffered repeaters, bridges, and gateways form a spectrum.
  2712. Those devices near the beginning of the  list  are  best  for  smaller
  2713. networks.    They  are  less expensive, and easier to set up, but less
  2714. general.  Those near the end of the list  are  suitable  for  building
  2715. more complex networks.  Many networks will contain a mixture of switch
  2716. types, with repeaters being used  to  connect  a  few  nearby  network
  2717. segments,  bridges  used  for somewhat larger areas, and gateways used
  2718. for long-distance links.
  2719.  
  2720. Note that this document so far has  assumed  that  only  gateways  are
  2721. being  used.  The section on setting up a host described how to set up
  2722. a routing table  listing  the  gateways  to  use  to  get  to  various
  2723. networks.    Repeaters  and bridges are invisible to IP.  So as far as
  2724. previous sections are concerned, networks connected by them are to  be
  2725. considered a single network.  Section 3.4 describes how to configure a
  2726. host in the case  where  several  subnets  are  carried  on  a  single
  2727. physical  network.  The same configuration should be used when several
  2728. subnets are connected by repeaters or bridges.
  2729.  
  2730. As mentioned above, the most important dimensions  on  which  switches
  2731. vary are isolation, performance, routing, network management.
  2732.  
  2733.  
  2734.  
  2735. 6.3.1 Isolation
  2736.  
  2737.  
  2738. Generally  people  use switches to connect networks to each other.  So
  2739. they are normally thinking  of  gaining  connectivity,  not  providing
  2740. isolation.  However isolation is worth thinking about.  If you connect
  2741. two networks and  provide  no  isolation  at  all,  then  any  network
  2742. problems  on  other  networks suddenly appear on yours as well.  Also,
  2743. the two networks together may have enough traffic  to  overwhelm  your
  2744. network.  Thus it is well to think of choosing an appropriate level of
  2745. protection.
  2746.  
  2747. Isolation comes in  two  kinds:  isolation  against  malfunctions  and
  2748. traffic  isolation.  In order to discuss isolation of malfunctions, we
  2749. have to have a taxonomy of malfunctions.  Here are the  major  classes
  2750. of malfunctions, and which switches can isolate them:
  2751.  
  2752.    - Electrical  faults,  e.g.    a short in the cable or some sort of
  2753.      fault that distorts the signal.  All types of switch will confine
  2754.      this  to  one  side  of  the switch: repeater, buffered repeater,
  2755.      bridge, gateway.  These are worth  protecting  against,  although
  2756.      their frequency depends upon how often your cables are changed or
  2757.      disturbed.  It is rare for this sort of fault  to  occur  without
  2758.      some disturbance of the cable.
  2759.  
  2760.    - Transceiver and controller problems that general signals that are
  2761.      valid electrically but nevertheless incorrect (e.g. a continuous,
  2762.      infinitely  long  packet,  spurious  collisions,  never  dropping
  2763.                                   45
  2764.  
  2765.  
  2766.  
  2767.      carrier).  All except the  simple  repeater  will  confine  this:
  2768.      buffered  repeater, bridge, gateway.  (Such problems are not very
  2769.      common.)
  2770.  
  2771.    - Software malfunctions that  lead  to  excessive  traffic  between
  2772.      particular  hosts  (i.e.  not  broadcasts).  Bridges and gateways
  2773.      will isolate these.  (This type of failure is fairly rare.   Most
  2774.      software and protocol problems generate broadcasts.)
  2775.  
  2776.    - Software  malfunctions  that lead to excessive broadcast traffic.
  2777.      Gateways will isolate these.  Generally bridges will not, because
  2778.      they  must pass broadcasts.  Bridges with user-settable filtering
  2779.      can protect against some  broadcast  malfunctions.    However  in
  2780.      general  bridges  must  pass ARP, and most broadcast malfunctions
  2781.      involve ARP.    This  problem  is  not  severe  on  single-vendor
  2782.      networks  where software is under careful control.  However sites
  2783.      with  complex  network  environments  or   experimental   network
  2784.      software may see problems of this sort regularly.
  2785.  
  2786. Traffic isolation is provided by bridges and gateways.  The most basic
  2787. decision is how many computers can  be  put  onto  a  network  without
  2788. overloading  its capacity.  This requires knowledge of the capacity of
  2789. the network, but also how the hosts will use  it.    For  example,  an
  2790. Ethernet  may  support  hundreds of systems if all the network is used
  2791. for is remote logins and an occasional file transfer.  However if  the
  2792. computers  are diskless, and use the network for swapping, an Ethernet
  2793. will support between 10 and 40, depending upon their  speeds  and  I/O
  2794. rates.
  2795.  
  2796. When you have to put more computers onto a network than it can handle,
  2797. you split it into several networks and put some sort of switch between
  2798. them.    If  you  do  the split correctly, most of the traffic will be
  2799. between machines on the same piece.  This means putting clients on the
  2800. same  network  as  their servers, putting terminal servers on the same
  2801. network as the hosts that they access most commonly, etc.
  2802.  
  2803. Bridges and gateways generally  provide  similar  degrees  of  traffic
  2804. isolation.    In both cases, only traffic bound for hosts on the other
  2805. side of the switch is passed.  However see the discussion on routing.
  2806.  
  2807.  
  2808.  
  2809. 6.3.2 Performance
  2810.  
  2811.  
  2812. Absolute performance limits are becoming less of an issue as time goes
  2813. on,  since the switching technology is improving.  Generally repeaters
  2814. can handle the full bandwidth of the network.  (By their very  nature,
  2815. a  simple  repeater must be able to do so.) Bridges and gateways often
  2816. have performance limitations of  various  sorts.    Bridges  have  two
  2817. numbers  of  interest:  packet  scanning  rate  and  throughput.    As
  2818. explained above, a bridge must look at every packet  on  the  network,
  2819. even  ones that it does not forward.  The number of packets per second
  2820. that it can scan in this way is the packet scanning rate.   Throughput
  2821. applies  to both bridges and gateways.  This is the rate at which they
  2822.                                   46
  2823.  
  2824.  
  2825.  
  2826. can forward traffic.  Generally this depends upon datagram size.
  2827.  
  2828. Normally the number of datagrams per second that  a  unit  can  handle
  2829. will  be  greater for short datagrams than long ones.  Early models of
  2830. bridge varied from a few hundred datagrams per second to around  7000.
  2831. The higher speeds are for equipment that uses special-purpose hardware
  2832. to speed  up  the  process  of  scanning  packets.    First-generation
  2833. gateways  varied  from  a  few hundred datagrams per second to 1000 or
  2834. more.  However second-generation gateways  are  now  available,  using
  2835. special-purpose  hardware  of  the same sophistication as that used by
  2836. bridges.  They can handle on the order of 10000 datagrams per  second.
  2837. Thus  at  the  moment high-performance bridges and gateways can switch
  2838. most of the bandwidth of an Ethernet.   This  means  that  performance
  2839. should  no  longer  be  a  basis for choosing between types of switch.
  2840. However within a given type of switch, there are still specific models
  2841. with  higher or lower capacity.  And there may still be differences in
  2842. price/performance.  This is particularly true at the  low  end.    The
  2843. least  expensive bridges are currently less than half the price of the
  2844. least expensive gateway.
  2845.  
  2846. Unfortunately there  is  no  single  number  on  which  you  can  base
  2847. performance estimates.  The figure most commonly quoted is packets per
  2848. second.  Be aware that most vendors count a datagram only once  as  it
  2849. goes through a gateway, but that one prominent vendor counts datagrams
  2850. twice.  Thus their switching rates must be deflated by a factor of  2.
  2851. Also,  when comparing numbers make sure that they are for datagrams of
  2852. the same size.  A simple performance model is
  2853.  
  2854.     processing time = switching time + datagram size * time per byte
  2855.  
  2856. That is, the  time  to  switch  a  datagram  is  normally  a  constant
  2857. switching  time,  representing  interrupt  latency, header processing,
  2858. routing table lookup, etc., plus a component proportional to  datagram
  2859. size,  representing  the  time needed to do any datagram copying.  One
  2860. reasonable approach to reporting performance is to give datagrams  per
  2861. second  for  minimum and maximum size datagrams.  Another is to report
  2862. limiting switching speed in datagrams per  second  and  throughput  in
  2863. bytes per second, i.e.  the two terms of the equation above.
  2864.  
  2865.  
  2866.  
  2867. 6.3.3 Routing
  2868.  
  2869.  
  2870. Routing  refers  to  the  technology  used  to  decide where to send a
  2871. datagram next.  Of course for a repeater this is not an  issue,  since
  2872. repeaters forward every packet.
  2873.  
  2874. The  routing  strategy  for  a  bridge  turns  into two decisions: (1)
  2875. enabling and disabling links in order to maintain the  spanning  tree,
  2876. and  (2) deciding whether it should forward any particular packet, and
  2877. out what interface (if the bridge is capable of handling more than two
  2878. interfaces).    The  second  decision  is  usually based on a table of
  2879. MAC-level addresses.  As described above, this is built up by scanning
  2880. traffic  visible  from  each  interface.  The goal is to forward those
  2881.                                   47
  2882.  
  2883.  
  2884.  
  2885. packets whose destination is on the other side of the  bridge.    This
  2886. algorithm  requires  that  the  network configuration have no loops or
  2887. redundant lines.  Less sophisticated bridges  leave  this  up  to  the
  2888. system  designer.  With these bridges, you must set up your network so
  2889. that there are no loops in  it.    More  sophisticated  bridges  allow
  2890. arbitrary  topology,  but  disable  links until no loops remain.  This
  2891. provides extra reliability.  If a link fails, an alternative link will
  2892. be  turned  on  automatically.    Bridges  that  work  this way have a
  2893. protocol that allows them to detect when a unit must  be  disabled  or
  2894. reenabled,  so  that  at  any  instant the set of active links forms a
  2895. "spanning tree".  If you require the extra  reliability  of  redundant
  2896. links,  make  sure  that  the  bridges  you use can disable and enable
  2897. themselves in this way.  There is currently no official  standard  for
  2898. the  protocol  used among bridges, although there is a standard in the
  2899. proposal stage.  If you buy bridges from more than  one  vendor,  make
  2900. sure that their spanning-tree protocols will interoperate.
  2901.  
  2902. Gateways generally allow arbitrary network topologies, including loops
  2903. and  redundant  links.    Because  of  their  more   general   routing
  2904. algorithms,  gateways  must  maintain  a  model  of the entire network
  2905. topology.  Different routing techniques maintain models of greater  or
  2906. lesser   complexity,   and  use  the  data  with  varying  degrees  of
  2907. sophistication.  Gateways that handle IP should generally support  the
  2908. two  Internet  standard  routing  protocols:  RIP (Routing Information
  2909. Protocol)  and  EGP  (External  Gateway   Protocol).      EGP   is   a
  2910. special-purpose protocol for use in networks where there is a backbone
  2911. under a separate administration.  It allows exchange  of  reachability
  2912. information  with  the  backbone  in  a  controlled way.  If you are a
  2913. member of such a network, your gateway must  support  EGP.    This  is
  2914. becoming  common  enough  that it is probably a good idea to make sure
  2915. that all gateways support EGP.
  2916.  
  2917. RIP is a protocol designed to handle routing within small to  moderate
  2918. size networks, where line speeds do not differ radically.  Its primary
  2919. limitations are:
  2920.  
  2921.    - It cannot be used with networks where any path goes through  more
  2922.      than  15  gateways.  This range may be further reduced if you use
  2923.      an optional feature for giving a slow line a weight  larger  than
  2924.      one.
  2925.  
  2926.    - It  cannot  share  traffic  between parallel lines (although some
  2927.      implementations allow this if the lines are between the same pair
  2928.      of gateways).
  2929.  
  2930.    - It cannot adapt to changes in network load.
  2931.  
  2932.    - It  is  not well suited to situations where there are alternative
  2933.      routes through lines of very different speeds.
  2934.  
  2935.    - It may not be stable in networks where lines or gateways change a
  2936.      lot.
  2937.  
  2938. Some  vendors supply proprietary modifications to RIP that improve its
  2939. operation with EGP or increase the maximum path length beyond 15,  but
  2940.                                   48
  2941.  
  2942.  
  2943.  
  2944. do  not  otherwise modify it very much.  If you expect your network to
  2945. involve gateways from more  than  one  vendor,  you  should  generally
  2946. require  that  all of them support RIP, since this is the only routing
  2947. protocol that is generally available.  If you expect  to  use  a  more
  2948. sophisticated  protocol in addition, it may be useful for the gateways
  2949. to translate between their own protocol and RIP.    However  for  very
  2950. large  or  complex  networks,  there  may be no choice but to use some
  2951. other protocol throughout.
  2952.  
  2953. More sophisticated routing protocols are possible.  The  primary  ones
  2954. being considered today are cisco System's IGRP, and protocols based on
  2955. the SPF (shortest-path first) algorithms.  In general these  protocols
  2956. are designed for larger or more complex networks.  They are in general
  2957. stable under a wider  variety  of  conditions,  and  they  can  handle
  2958. arbitrary combinations of line type and speed.  Some of them allow you
  2959. to  split  traffic  among  parallel  paths,  to  get  better   overall
  2960. throughput.    Some newer technologies may allow the network to adjust
  2961. to take into account paths that are overloaded.  However at the moment
  2962. I  do  not  know of any commercial gateway that does this.  (There are
  2963. very serious problems with maintaining stable  routing  when  this  is
  2964. done.) There are enough variations among routing technology, and it is
  2965. changing rapidly enough, that you should discuss your proposed network
  2966. topology  in  detail with all of the vendors that you are considering.
  2967. Make sure that their technology can  handle  your  topology,  and  can
  2968. support  any  special  requirements  that you have for sharing traffic
  2969. among parallel lines, and for adjusting topology to take into  account
  2970. failures.    In  the  long  run,  we expect one or more of these newer
  2971. routing protocols to attain the status of a standard, at least on a de
  2972. facto basis.  However at the moment, there is no generally implemented
  2973. routing technology other than RIP.
  2974.  
  2975. One additional routing topic to consider is policy-based routing.   In
  2976. general routing protocols are designed to find the shortest or fastest
  2977. possible path for every datagram.  In some cases, this is not desired.
  2978. For  reasons  of  security, cost accountability, etc., you may wish to
  2979. limit certain paths to certain uses.   Most  gateways  now  have  some
  2980. ability to control the spread of routing information so as to give you
  2981. some administrative control over the way routes are used.    Different
  2982. gateways  vary  in the degree of control that they support.  Make sure
  2983. that you discuss any requirements that you have for control  with  all
  2984. prospective gateway vendors.
  2985.  
  2986.  
  2987.  
  2988. 6.3.4 Network management
  2989.  
  2990.  
  2991. Network  management  covers  a  wide variety of topics.  In general it
  2992. includes gathering statistical data and status information about parts
  2993. of  your network, and taking action as necessary to deal with failures
  2994. and  other  changes.    The  most  primitive  technique  for   network
  2995. monitoring  is  periodic  "pinging"  of  critical hosts.  Pinging is a
  2996. monitoring technique that depends on an "echo" datagram.   This  is  a
  2997. specific  type  of  datagram  that  requests an immediate reply.  Most
  2998. TCP/IP implementations contain a program (usually called "ping")  that
  2999.                                   49
  3000.  
  3001.  
  3002.  
  3003. sends  an echo to a specified host.  If you get a reply, you know that
  3004. the host is up, and that the network connection to the host works.  If
  3005. you  don't  get  a reply, you know that something is wrong with one of
  3006. the other.  By pinging a reasonable sample of hosts, you can  normally
  3007. tell  what  is  going on.  If all the hosts on a network suddenly stop
  3008. returning pings, it is reasonable to conclude that the  connection  to
  3009. that  network  has  gone  bad.  If one host stops returning pings, but
  3010. other hosts on the same network still do, then  it  is  reasonable  to
  3011. conclude that the host has crashed.
  3012.  
  3013. More  sophisticated  network  monitoring  requires  the ability to get
  3014. specific status and statistical information from  various  devices  on
  3015. the  network.   These should include various sorts of datagram counts,
  3016. as well as counts of errors of various kinds.  This data is likely  to
  3017. be  most detailed in a gateway, since the gateway classifies datagrams
  3018. using the protocols, and may even respond to certain types of datagram
  3019. itself.    However  bridges  and even buffered repeaters can certainly
  3020. have counts of datagrams forwarded, interface errors, etc.  It  should
  3021. be possible to collect this data from a central monitoring point.
  3022.  
  3023. There  is  now an official TCP/IP approach to network monitoring.  The
  3024. first stages use a related set of protocols, SGMP and SNMP.   Both  of
  3025. these  protocols  are designed to allow you to collect information and
  3026. to make changes in configuration parameters  for  gateways  and  other
  3027. entities  on  your  network.   You can run the corresponding interface
  3028. programs on any host in your network.    SGMP  is  now  available  for
  3029. several  commercial  gateways,  as  well  as for Unix systems that are
  3030. acting as gateways.  There is a limited set of information  which  any
  3031. SGMP  implementation  is  required  to  supply,  as  well as a uniform
  3032. mechanism for vendors to add information of their own.  By late  1988,
  3033. the  second  generation  of this protocol, SNMP, should be in service.
  3034. This is a slightly more sophisticated protocol.  It has with it a more
  3035. complete  set  of  information  that  can be monitored, called the MIB
  3036. (Management Information Base).  Unlike the somewhat ad hoc  collection
  3037. of  SGMP  variables,  the  MIB  is  the  result  of numerous committee
  3038. deliberations involving a number of vendors and users.  Eventually  it
  3039. is  expected  that  there will be a TCP/IP equivalent of CMIS, the ISO
  3040. network monitoring service.  However CMIS, and  its  protocols,  CMIP,
  3041. are  not  yet  official  ISO  standards,  so  they  are  still  in the
  3042. experimental stages.
  3043.  
  3044. In general terms all of these protocols  accomplish  the  same  thing:
  3045. They  allow  you to collect critical information in a uniform way from
  3046. all vendors' equipment.  You send commands as  UDP  datagrams  from  a
  3047. network  management  program  running  on  some  host in your network.
  3048. Generally the interaction is fairly simple,  with  a  single  pair  of
  3049. datagrams exchanged: a command and a response.  At the moment security
  3050. is fairly simple.  It  is  possible  to  require  what  amounts  to  a
  3051. password  in  the  command.   (In SGMP it is referred to as a "session
  3052. name", rather  than  a  password.)  More  elaborate,  encryption-based
  3053. security is being developed.
  3054.  
  3055. You  will  probably  want to configure the network management tools at
  3056. your disposal to do several different things.  For short-term  network
  3057. monitoring,  you will want to keep track of switches crashing or being
  3058.                                   50
  3059.  
  3060.  
  3061.  
  3062. taken down for maintenance, and of failure of communications lines and
  3063. other  hardware.  It is possible to configurate SGMP and SNMP to issue
  3064. "traps" (unsolicited messages) to a specified host or  list  of  hosts
  3065. when  some  of  these  critical events occur (e.g. lines up and down).
  3066. However it is unrealistic to expect a switch to  notify  you  when  it
  3067. crashes.    It  is  also  possible for trap messages to be lost due to
  3068. network failure or overload.  Thus  you  can't  depend  completely  on
  3069. traps.    You  should  also  poll  your  switches  regularly to gather
  3070. information.  Various displays are available, including a map of  your
  3071. network  where items change color as their status changes, and running
  3072. "strip charts" that  show  datagram  rates  and  other  items  through
  3073. selected switches.  This software is still in its early stages, so you
  3074. should expect to see a lot of change here.  However at the very  least
  3075. you  should  expect  to  be notified in some way of failures.  You may
  3076. also want to be able to take actions  to  reconfigure  the  system  in
  3077. response  to  failures,  although  security  issues make some managers
  3078. nervous about doing that through the existing management protocols.
  3079.  
  3080. The second type of monitoring you are likely  to  want  to  do  is  to
  3081. collect information for use in periodic reports on network utilization
  3082. and  performance.    For  this,  you  need  to  sample   each   switch
  3083. perodically,  and  retrieve numbers of interest.  At Rutgers we sample
  3084. hourly, and get the number of datagrams forwarded for IP and DECnet, a
  3085. count  of reloads, and various error counts.  These are reported daily
  3086. in some detail.  Monthly summaries are produced giving traffic through
  3087. each  gateway,  and a few key error rates chosen to indicate a gateway
  3088. that is being overloaded (datagrams dropped in input and output).
  3089.  
  3090. It should be possible to use monitoring techniques of this  kind  with
  3091. most  types  of switch.  At the moment, simple repeaters do not report
  3092. any statistics.  Since they do not generally have processors in  them,
  3093. doing  so  would  cause  a  major  increase in their cost.  However it
  3094. should be possible to put  network  management  software  in  buffered
  3095. repeaters,  bridges,  and  gateways.   Gateways are the most likely to
  3096. contain sophisticated  network  management  software.    Most  gateway
  3097. vendors  that  handle  IP  are  expected  to  implement the monitoring
  3098. protocols described above.  Many bridge vendors make  some  provisions
  3099. for   collecting   performance   data.      Since   bridges   are  not
  3100. protocol-specific, most of them do not have the software necessary  to
  3101. implement  TCP/IP-based  network management protocols.  In some cases,
  3102. monitoring can be done only by typing commands to a  directly-attached
  3103. console.    (We  have  seen one case where it is necessary to take the
  3104. bridge out of service to gather this data.)  In  other  cases,  it  is
  3105. possible  to  gather data via the network, but the monitoring protocol
  3106. is ad hoc or even proprietary.
  3107.  
  3108. Except for very small networks, you should probably  insist  that  any
  3109. switch  more  complex than a simple repeater should collect statistics
  3110. and provide some way of querying  them  remotely.    Portions  of  the
  3111. network  that  do  not  support  such  operations  can be monitored by
  3112. pinging.  However ping simply detects  gross  failures.  It  does  not
  3113. allow  you  to  look  at  the  noise  level of a serial line and other
  3114. quantities needed to do high-quality maintenance.  In  the  long  run,
  3115. you  can  expect  the  most  software  to  be  available  for standard
  3116. protocols such as SGMP/SNMP and CMIS.  However proprietary  monitoring
  3117.                                   51
  3118.  
  3119.  
  3120.  
  3121. tools may be sufficient as long as they work with all of the equipment
  3122. that you have.
  3123.  
  3124.  
  3125.  
  3126. 6.3.5 A final evaluation
  3127.  
  3128.  
  3129. Here is a summary of the places where each kind of  switch  technology
  3130. is normally used:
  3131.  
  3132.    - Repeaters are normally confined to a single building.  Since they
  3133.      provide no traffic isolation, you must make sure that the  entire
  3134.      set of networks connected by repeaters can carry the traffic from
  3135.      all of the computers on it.   Since  they  generally  provide  no
  3136.      network  monitoring tools, you will not want to use repeaters for
  3137.      a link that is likely to fail.
  3138.  
  3139.    - Bridges and gateways should be placed sufficiently frequently  to
  3140.      break  your  network  into pieces for which the traffic volume is
  3141.      manageable.  You may want to place bridges or  gateways  even  in
  3142.      places  where  traffic  level  alone  would  not require them for
  3143.      network monitoring reasons.
  3144.  
  3145.    - Because bridges must pass broadcast datagrams, there is  a  limit
  3146.      to the size network you can construct using them.  It is probably
  3147.      a good idea to limit  the  network  connected  by  bridges  to  a
  3148.      hundred systems or so.  This number can be increased somewhat for
  3149.      bridges with good facilities for filtering.
  3150.  
  3151.    - Because certain kinds of  network  misbehavior  will  be  passed,
  3152.      bridges should be used only among portions of the network where a
  3153.      single group is responsible for diagnosing problems.  You have to
  3154.      be  crazy  to  use  a  bridge between networks owned by different
  3155.      organizations.  Portions of your network  where  experiments  are
  3156.      being  done  in network technology should always be isolated from
  3157.      the rest of the network by gateways.
  3158.  
  3159.    - For many applications it is more important to  choose  a  product
  3160.      with  the  right  combination  of performance, network management
  3161.      tools, and other features  than  to  make  the  decision  between
  3162.      bridges and gateways.
  3163.  
  3164.  
  3165.  
  3166. 7. Configuring Gateways
  3167.  
  3168.  
  3169. This  section  deals  with  configuration  issues that are specific to
  3170. gateways.  Gateways that handle  IP  are  themselves  Internet  hosts.
  3171. Thus  the  discussions  above  on  configuring  addresses  and routing
  3172. information apply to gateways as well as to hosts.  The exact way  you
  3173. configure  a  gateway will depend upon the vendor.  In some cases, you
  3174. edit files stored on a disk  in  the  gateway  itself.    However  for
  3175. reliability reasons most gateways do not have disks of their own.  For
  3176.                                   52
  3177.  
  3178.  
  3179.  
  3180. them, configuration information is stored in non-volatile memory or in
  3181. configuration  files  that  are uploaded from one or more hosts on the
  3182. network.
  3183.  
  3184. At a minimum, configuration involves specifying  the  IP  address  and
  3185. address  mask  for each interface, and enabling an appropriate routing
  3186. protocol.  However generally a few other options are desirable.  There
  3187. are often parameters in addition to the IP address that you should set
  3188. for each interface.
  3189.  
  3190. One important parameter is the broadcast address.  As explained above,
  3191. older  software may react badly when broadcasts are sent using the new
  3192. standard broadcast address.  For this reason, some vendors  allow  you
  3193. to choose a broadcast address to be used on each interface.  It should
  3194. be set using your knowledge of what  computers  are  on  each  of  the
  3195. networks.    In  general  if the computers follow current standards, a
  3196. broadcast address of 255.255.255.255 should be used.    However  older
  3197. implementations  may  behave better with other addresses, particularly
  3198. the address that uses zeros for the host number.    (For  the  network
  3199. 128.6  this  would be 128.6.0.0.  For compatibility with software that
  3200. does not implement subnets, you would use 128.6.0.0 as  the  broadcast
  3201. address  even  for  a  subnet  such as 128.6.4.) You should watch your
  3202. network with  a  network  monitor  and  see  the  results  of  several
  3203. different  broadcast address choices.  If you make a bad choice, every
  3204. time the gateway sends a routing update broadcast,  many  machines  on
  3205. your  network  will respond with ARP's or ICMP errors.  Note that when
  3206. you change the broadcast address in  the  gateway,  you  may  need  to
  3207. change  it on the individual computers as well.  Generally the idea is
  3208. to change the address on the systems that you can  configure  to  give
  3209. behavior that is compatible with systems that you can't configure.
  3210.  
  3211. Other interface parameters may be necessary to deal with peculiarities
  3212. of the network it is connected to.  For example,  many  gateways  test
  3213. Ethernet  interfaces  to make sure that the cable is connected and the
  3214. transceiver is working correctly.  Some of these tests will  not  work
  3215. properly  with  the older Ethernet version 1 transceivers.  If you are
  3216. using such a transceiver, you would have  to  disable  this  keepalive
  3217. testing.    Similarly, gateways connected by a serial line normally do
  3218. regular testing to make sure that the line is still  working.    There
  3219. can be situations where this needs to be disabled.
  3220.  
  3221. Often  you  will have to enable features of the software that you want
  3222. to use.  For example, it is often necessary to  turn  on  the  network
  3223. management  protocol explicitly, and to give it the name or address of
  3224. a host that is running software to accept traps (error messages).
  3225.  
  3226. Most gateways have options that relate to security.    At  a  minimum,
  3227. this may include setting password for making changes remotely (and the
  3228. "session name" for SGMP).  If you need to control  access  to  certain
  3229. parts  of  your  network,  you will also need to define access control
  3230. lists or whatever other mechanism your gateway uses.
  3231.  
  3232. Gateways that load configuration information over the network  present
  3233. special  issues.    When  such  a  gateway  boots,  it sends broadcast
  3234. requests of various kinds, attempting to find its Internet address and
  3235.                                   53
  3236.  
  3237.  
  3238.  
  3239. then  to load configuration information.  Thus it is necessary to make
  3240. sure that there is some computer that is prepared to respond to  these
  3241. requests.    In  some cases, this is a dedicated micro running special
  3242. software.  In other cases, generic software is available that can  run
  3243. on a variety of machines.  You should consult your vendor to make sure
  3244. that this can be arranged.  For reliability reasons, you  should  make
  3245. sure  that  there  is  more  than  one  host  with the information and
  3246. programs that your gateways need.  In some  cases  you  will  have  to
  3247. maintain  several  different files.  For example, the gateways used at
  3248. Rutgers use a program called "bootp" to supply their Internet address,
  3249. and  they then load the code and configuration information using TFTP.
  3250. This means that we have to maintain a file  for  bootp  that  contains
  3251. Ethernet  and  Internet addresses for each gateway, and a set of files
  3252. containing other configuration information for each gateway.  If  your
  3253. network  is  large,  it is worth taking some trouble to make sure that
  3254. this information remains consistent.  We keep master copies of all  of
  3255. the  configuration information on a single computer, and distribute it
  3256. to other systems when it changes, using the Unix  utilities  make  and
  3257. rdist.    If  your  gateway  has  an  option  to  store  configuration
  3258. information in non-volatile memory, you will eliminate some  of  these
  3259. logistical  headaches.    However this presents its own problems.  The
  3260. contents of non-volatile memory should be backed up  in  some  central
  3261. location.   It will also be harder for network management personnel to
  3262. review configuration  information  if  it  is  distributed  among  the
  3263. gateways.
  3264.  
  3265. Starting   a   gateway   is   particularly  challenging  if  it  loads
  3266. configuration information from  a  distant  portion  of  the  network.
  3267. Gateways  that  expect  to  take  configuration  information  from the
  3268. network generally issue broadcast requests on all of the  networks  to
  3269. which  they  are  connected.    If there is a computer on one of those
  3270. networks that is prepared  to  respond  to  the  request,  things  are
  3271. straightforward.    However  some  gateways may be in remote locations
  3272. where there are no  nearby  computer  systems  that  can  support  the
  3273. necessary protocols.  In this case, it is necessary to arrange for the
  3274. requests to be routed back to the network where there are  appropriate
  3275. computers.  This requires what is strictly speaking a violation of the
  3276. basic design philosophy for gateways.  Generally a gateway should  not
  3277. allow  broadcasts  from  one  network  to  pass through to an adjacent
  3278. network.  In order to allow  a  gateway  to  get  information  from  a
  3279. computer  on  a  different  network,  at  least one of the gateways in
  3280. between will have to be configured to pass  the  particular  class  of
  3281. broadcasts  used  to retrieve this information.  If you have this sort
  3282. of configuration, you should test the loading process regularly.    It
  3283. is  not  unusual  to  find  that gateways do not come up after a power
  3284. failure because someone changed the configuration of  another  gateway
  3285. and made it impossible to load some necessary information.
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.                                   54
  3295.  
  3296.  
  3297.  
  3298. 7.1 Configuring routing for gateways
  3299.  
  3300.  
  3301. The final topic to be considered is configuring routing.  This is more
  3302. complex for a gateway than for a normal host.    Most  TCP/IP  experts
  3303. recommend that routing be left to the gateways.  Thus hosts may simply
  3304. have a default route that points to the nearest gateway.    Of  course
  3305. the  gateways  themselves  can't  get by with this.  They need to have
  3306. complete routing tables.
  3307.  
  3308. In order to understand how to configure a gateway, we have to look  in
  3309. a  bit more detail at how gateways communicate routes.  When you first
  3310. turn on a gateway, the only networks it knows about are the ones  that
  3311. are   directly   connected   to  it.    (They  are  specified  by  the
  3312. configuration information.)  In order to find out how to get  to  more
  3313. distant  parts  of  the  network,  it engages in some sort of "routing
  3314. protocol".  A routing protocol is simply a protocol that  allows  each
  3315. gateway  to advertise which networks it can get to, and to spread that
  3316. information from one gateway to the next.   Eventually  every  gateway
  3317. should  know  how to get to every network.  There are different styles
  3318. of routing protocol.  In one common type, gateways talk only to nearby
  3319. gateways.    In  another  type,  every  gateway  builds  up a database
  3320. describing every other gateway in the system.    However  all  of  the
  3321. protocols have some way for each gateway in the system to find out how
  3322. to get to every destination.
  3323.  
  3324. A metric is some number or set of numbers that can be used to  compare
  3325. routes.    The  routing  table is constructed by gathering information
  3326. from other gateways.  If two other gateways claim to be able to get to
  3327. the  same destination, there must be some way of deciding which one to
  3328. use.  The metric is used to make that decision.  Metrics all  indicate
  3329. in  some  general  sense the "cost" of a route.  This may be a cost in
  3330. dollars  of  sending  datagrams  over  that  route,   the   delay   in
  3331. milliseconds,  or  some  other measure.  The simplest metric is just a
  3332. count of the number of gateways along the path.  This is  referred  to
  3333. as  a  "hop  count".   Generally this metric information is set in the
  3334. gateway configuration files, or is derived from information  appearing
  3335. there.
  3336.  
  3337. At  a minimum, routing configuration is likely to consist of a command
  3338. to enable the routing protocol that you want to  use.    Most  vendors
  3339. will have a prefered routing protocol.  Unless you have some reason to
  3340. choose another, you should use that.  The normal reason  for  choosing
  3341. another  protocol  is  for  compatibility with other kinds of gateway.
  3342. For example, your network may be  connected  to  a  national  backbone
  3343. network  that  requires  you to use EGP (exterior gateway protocol) to
  3344. communicate routes with it.  EGP is only appropriate for that specific
  3345. case.    You  should  not use EGP within your own network, but you may
  3346. need to use it  in  addition  to  your  regular  routing  protocol  to
  3347. communicate  with a national network.  If your own network has several
  3348. different types of gateway, then  you  may  need  to  pick  a  routing
  3349. protocol  that  all of them support.  At the moment, this is likely to
  3350. be RIP (Routing Information Protocol).  Depending upon the  complexity
  3351. of  your  network,  you  could  use  RIP  throughout it, or use a more
  3352. sophisticated protocol among the gateways that support it, and use RIP
  3353.                                   55
  3354.  
  3355.  
  3356.  
  3357. only at the boundary between gateways from different vendors.
  3358.  
  3359. Assuming  that  you  have  chosen a routing protocol and turned it on,
  3360. there are some additional decisions that you may need to make.  One of
  3361. the  more  basic configuration options has to do with supplying metric
  3362. information.  As indicated above, metrics are numbers which  are  used
  3363. to decide which route is the best.  Unsophisticated routing protocols,
  3364. e.g. RIP, normally just count hops.  So a route that passes through  2
  3365. gateways  would  be  considered better than one that passes through 3.
  3366. Of course if the latter route used 1.5Mbps lines and the  former  9600
  3367. bps  lines,  this  would  be  the  wrong  decision.  Thus most routing
  3368. protocols allow you to set parameters to take this sort of thing  into
  3369. account.  With RIP, you would arrange to treat the 9600 bps line as if
  3370. it were several hops.  You would  increase  the  effective  hop  count
  3371. until  the  better route was chosen.  More sophisticated protocols may
  3372. take the bit rate of the line into account automatically.  However you
  3373. should  be on the lookout for configuration parameters that need to be
  3374. set.    Generally  these  parameters  will  be  associated  with   the
  3375. particular  interface.   For example, with RIP you would have to set a
  3376. metric value for the interface connected to the 9600 bps line.    With
  3377. protocols  that  are  based on bit rate, you might need to specify the
  3378. speed  of  each  line  (if  the   gateway   cannot   figure   it   out
  3379. automatically).
  3380.  
  3381. Most  routing  protocols  are  designed  to let each gateway learn the
  3382. topology of the entire network, and to choose the best possible  route
  3383. for  each  datagram.  In some cases you may not want to use the "best"
  3384. route.  You may want traffic to stay out of a certain portion  of  the
  3385. network  for  security  or  cost  reasons.   One way to institute such
  3386. controls is by specifying routing options.  These options  are  likely
  3387. to be different for different vendors.  But the basic strategy is that
  3388. if the rest of the network doesn't know about a  route,  it  won't  be
  3389. used.    So  controls normally take the form of limiting the spread of
  3390. information about routes whose use you want to control.
  3391.  
  3392. Note that there  are  ways  for  the  user  to  override  the  routing
  3393. decisions made by your gateways.  If you really need to control access
  3394. to a certain network, you will have to do two separate things:
  3395.  
  3396.    - Use routing controls to make sure that the gateways use only  the
  3397.      routes you want them to.
  3398.  
  3399.    - Use access control lists on the gateways that are adjacent to the
  3400.      sensitive networks.
  3401.  
  3402. These two mechanisms act at different levels.   The  routing  controls
  3403. affect  what  happens  to most datagrams: those where the user has not
  3404. specified routing manually.  Your routing mechanism must be set up  to
  3405. choose an acceptable route for them.  The access control list provides
  3406. an additional limitation which prevents users from supplying their own
  3407. routing and bypassing your controls.
  3408.  
  3409. For  reliability  and  security reasons, there may also be controls to
  3410. allow you to list the gateways from which you will accept information.
  3411. It  may  also  be possible to rank gateways by priority.  For example,
  3412.                                   56
  3413.  
  3414.  
  3415.  
  3416. you might decide to listen to routes from within your own organization
  3417. before   routes  from  other  organizations  or  other  parts  of  the
  3418. organization.  This would  have  the  effect  of  having  traffic  use
  3419. internal  routes  in preference to external ones, even if the external
  3420. ones appear to be better.
  3421.  
  3422. If you use several different routing protocols, you will probably have
  3423. some  decisions  to  make regarding how much information to pass among
  3424. them.  Since multiple routing  protocols  are  often  associated  with
  3425. multiple  organizations,  you  must be sure to make these decisions in
  3426. consultation  with  management  of  all  of  the  relevant   networks.
  3427. Decisions  that  you  make may have consequences for the other network
  3428. which are not immediately obvious.  You might think it would  be  best
  3429. to  configure  the gateway so that everything it knows is passed on by
  3430. all routing protocols.  However here are some reasons why you may  not
  3431. want to do so:
  3432.  
  3433.    - The  metrics  used  by  different  routing  protocols  may not be
  3434.      comparable.  If you  are  connected  to  two  different  external
  3435.      networks,  you  want to specify that one should always be used in
  3436.      preference to the other, or that the nearest one should be  used,
  3437.      rather  than  attempting  to  compare metric information received
  3438.      from the two networks to see which has the better route.
  3439.  
  3440.    - EGP is particularly sensitive, because the  EGP  protocol  cannot
  3441.      handle  loops.    Thus  there  are  strict  rules  governing what
  3442.      information may be communicated to a backbone that uses EGP.   In
  3443.      situations  where  EGP  is being used, management of the backbone
  3444.      network should help you configure your routing.
  3445.  
  3446.    - If you have slow lines in your network (9600 bps or slower),  you
  3447.      may  prefer  not  to send a complete routing table throughout the
  3448.      network.  If you are connected to an external  network,  you  may
  3449.      prefer  to treat it as a default route, rather than to inject all
  3450.      of its routing information into your routing protocol.
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.                                   57
  3472.